// *** 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.network;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.ExpressRouteCircuitAuthorizationArgs;
import com.pulumi.azure.network.inputs.ExpressRouteCircuitAuthorizationState;
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.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Manages an ExpressRoute Circuit Authorization.
 * 
 * ## 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.network.ExpressRouteCircuit;
 * import com.pulumi.azure.network.ExpressRouteCircuitArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
 * import com.pulumi.azure.network.ExpressRouteCircuitAuthorization;
 * import com.pulumi.azure.network.ExpressRouteCircuitAuthorizationArgs;
 * 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 exampleExpressRouteCircuit = new ExpressRouteCircuit(&#34;exampleExpressRouteCircuit&#34;, ExpressRouteCircuitArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .serviceProviderName(&#34;Equinix&#34;)
 *             .peeringLocation(&#34;Silicon Valley&#34;)
 *             .bandwidthInMbps(50)
 *             .sku(ExpressRouteCircuitSkuArgs.builder()
 *                 .tier(&#34;Standard&#34;)
 *                 .family(&#34;MeteredData&#34;)
 *                 .build())
 *             .allowClassicOperations(false)
 *             .tags(Map.of(&#34;environment&#34;, &#34;Production&#34;))
 *             .build());
 * 
 *         var exampleExpressRouteCircuitAuthorization = new ExpressRouteCircuitAuthorization(&#34;exampleExpressRouteCircuitAuthorization&#34;, ExpressRouteCircuitAuthorizationArgs.builder()        
 *             .expressRouteCircuitName(exampleExpressRouteCircuit.name())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * ExpressRoute Circuit Authorizations can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization auth1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute/authorizations/auth1
 * ```
 * 
 */
@ResourceType(type="azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization")
public class ExpressRouteCircuitAuthorization extends com.pulumi.resources.CustomResource {
    /**
     * The Authorization Key.
     * 
     */
    @Export(name="authorizationKey", refs={String.class}, tree="[0]")
    private Output<String> authorizationKey;

    /**
     * @return The Authorization Key.
     * 
     */
    public Output<String> authorizationKey() {
        return this.authorizationKey;
    }
    /**
     * The authorization use status.
     * 
     */
    @Export(name="authorizationUseStatus", refs={String.class}, tree="[0]")
    private Output<String> authorizationUseStatus;

    /**
     * @return The authorization use status.
     * 
     */
    public Output<String> authorizationUseStatus() {
        return this.authorizationUseStatus;
    }
    /**
     * The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="expressRouteCircuitName", refs={String.class}, tree="[0]")
    private Output<String> expressRouteCircuitName;

    /**
     * @return The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> expressRouteCircuitName() {
        return this.expressRouteCircuitName;
    }
    /**
     * The name of the ExpressRoute circuit. 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 ExpressRoute circuit. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The name of the resource group in which to create the ExpressRoute circuit. 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 to create the ExpressRoute circuit. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ExpressRouteCircuitAuthorization(String name) {
        this(name, ExpressRouteCircuitAuthorizationArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ExpressRouteCircuitAuthorization(String name, ExpressRouteCircuitAuthorizationArgs 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 ExpressRouteCircuitAuthorization(String name, ExpressRouteCircuitAuthorizationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization", name, args == null ? ExpressRouteCircuitAuthorizationArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private ExpressRouteCircuitAuthorization(String name, Output<String> id, @Nullable ExpressRouteCircuitAuthorizationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization", 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())
            .additionalSecretOutputs(List.of(
                "authorizationKey"
            ))
            .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 ExpressRouteCircuitAuthorization get(String name, Output<String> id, @Nullable ExpressRouteCircuitAuthorizationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ExpressRouteCircuitAuthorization(name, id, state, options);
    }
}
