// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.containerapp;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.containerapp.EnvironmentArgs;
import com.pulumi.azure.containerapp.inputs.EnvironmentState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Container App Environment.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
 * import com.pulumi.azure.containerapp.Environment;
 * import com.pulumi.azure.containerapp.EnvironmentArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleAnalyticsWorkspace = new AnalyticsWorkspace(&#34;exampleAnalyticsWorkspace&#34;, AnalyticsWorkspaceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .sku(&#34;PerGB2018&#34;)
 *             .retentionInDays(30)
 *             .build());
 * 
 *         var exampleEnvironment = new Environment(&#34;exampleEnvironment&#34;, EnvironmentArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * A Container App Environment can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:containerapp/environment:Environment example &#34;/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/myEnvironment&#34;
 * ```
 * 
 */
@ResourceType(type="azure:containerapp/environment:Environment")
public class Environment extends com.pulumi.resources.CustomResource {
    /**
     * The default, publicly resolvable, name of this Container App Environment.
     * 
     */
    @Export(name="defaultDomain", refs={String.class}, tree="[0]")
    private Output<String> defaultDomain;

    /**
     * @return The default, publicly resolvable, name of this Container App Environment.
     * 
     */
    public Output<String> defaultDomain() {
        return this.defaultDomain;
    }
    /**
     * The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.
     * 
     */
    @Export(name="dockerBridgeCidr", refs={String.class}, tree="[0]")
    private Output<String> dockerBridgeCidr;

    /**
     * @return The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.
     * 
     */
    public Output<String> dockerBridgeCidr() {
        return this.dockerBridgeCidr;
    }
    /**
     * The existing Subnet to use for the Container Apps Control Plane. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The Subnet must have a `/21` or larger address space.
     * 
     */
    @Export(name="infrastructureSubnetId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> infrastructureSubnetId;

    /**
     * @return The existing Subnet to use for the Container Apps Control Plane. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The Subnet must have a `/21` or larger address space.
     * 
     */
    public Output<Optional<String>> infrastructureSubnetId() {
        return Codegen.optional(this.infrastructureSubnetId);
    }
    /**
     * Should the Container Environment operate in Internal Load Balancing Mode? Defaults to `false`. Changing this forces a new resource to be created.
     * 
     * &gt; **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified.
     * 
     */
    @Export(name="internalLoadBalancerEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> internalLoadBalancerEnabled;

    /**
     * @return Should the Container Environment operate in Internal Load Balancing Mode? Defaults to `false`. Changing this forces a new resource to be created.
     * 
     * &gt; **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified.
     * 
     */
    public Output<Optional<Boolean>> internalLoadBalancerEnabled() {
        return Codegen.optional(this.internalLoadBalancerEnabled);
    }
    /**
     * Specifies the supported Azure location where the Container App Environment is to exist. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure location where the Container App Environment is to exist. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="logAnalyticsWorkspaceId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> logAnalyticsWorkspaceId;

    /**
     * @return The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> logAnalyticsWorkspaceId() {
        return Codegen.optional(this.logAnalyticsWorkspaceId);
    }
    /**
     * The name of the Container Apps Managed Environment. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name of the Container Apps Managed Environment. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.
     * 
     */
    @Export(name="platformReservedCidr", refs={String.class}, tree="[0]")
    private Output<String> platformReservedCidr;

    /**
     * @return The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.
     * 
     */
    public Output<String> platformReservedCidr() {
        return this.platformReservedCidr;
    }
    /**
     * The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.
     * 
     */
    @Export(name="platformReservedDnsIpAddress", refs={String.class}, tree="[0]")
    private Output<String> platformReservedDnsIpAddress;

    /**
     * @return The IP address from the IP range defined by `platform_reserved_cidr` that is reserved for the internal DNS server.
     * 
     */
    public Output<String> platformReservedDnsIpAddress() {
        return this.platformReservedDnsIpAddress;
    }
    /**
     * The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The Static IP address of the Environment.
     * 
     */
    @Export(name="staticIpAddress", refs={String.class}, tree="[0]")
    private Output<String> staticIpAddress;

    /**
     * @return The Static IP address of the Environment.
     * 
     */
    public Output<String> staticIpAddress() {
        return this.staticIpAddress;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Environment(String name) {
        this(name, EnvironmentArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Environment(String name, EnvironmentArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Environment(String name, EnvironmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:containerapp/environment:Environment", name, args == null ? EnvironmentArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Environment(String name, Output<String> id, @Nullable EnvironmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:containerapp/environment:Environment", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Environment get(String name, Output<String> id, @Nullable EnvironmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Environment(name, id, state, options);
    }
}
