// *** 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.NetworkManagerScopeConnectionArgs;
import com.pulumi.azure.network.inputs.NetworkManagerScopeConnectionState;
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.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Network Manager Scope Connection which may cross tenants.
 * 
 * ## 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.core.CoreFunctions;
 * import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
 * import com.pulumi.azure.network.NetworkManager;
 * import com.pulumi.azure.network.NetworkManagerArgs;
 * import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
 * import com.pulumi.azure.network.NetworkManagerScopeConnection;
 * import com.pulumi.azure.network.NetworkManagerScopeConnectionArgs;
 * 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());
 * 
 *         final var currentClientConfig = CoreFunctions.getClientConfig();
 * 
 *         final var currentSubscription = CoreFunctions.getSubscription();
 * 
 *         final var alt = CoreFunctions.getSubscription(GetSubscriptionArgs.builder()
 *             .subscriptionId(&#34;00000000-0000-0000-0000-000000000000&#34;)
 *             .build());
 * 
 *         var exampleNetworkManager = new NetworkManager(&#34;exampleNetworkManager&#34;, NetworkManagerArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .scope(NetworkManagerScopeArgs.builder()
 *                 .subscriptionIds(currentSubscription.applyValue(getSubscriptionResult -&gt; getSubscriptionResult.id()))
 *                 .build())
 *             .scopeAccesses(&#34;SecurityAdmin&#34;)
 *             .build());
 * 
 *         var exampleNetworkManagerScopeConnection = new NetworkManagerScopeConnection(&#34;exampleNetworkManagerScopeConnection&#34;, NetworkManagerScopeConnectionArgs.builder()        
 *             .networkManagerId(exampleNetworkManager.id())
 *             .tenantId(currentClientConfig.applyValue(getClientConfigResult -&gt; getClientConfigResult.tenantId()))
 *             .targetScopeId(alt.applyValue(getSubscriptionResult -&gt; getSubscriptionResult.id()))
 *             .description(&#34;example&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Network Manager Scope Connection can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/scopeConnections/scopeConnection1
 * ```
 * 
 */
@ResourceType(type="azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection")
public class NetworkManagerScopeConnection extends com.pulumi.resources.CustomResource {
    /**
     * The Connection state of the Network Manager Scope Connection.
     * 
     */
    @Export(name="connectionState", refs={String.class}, tree="[0]")
    private Output<String> connectionState;

    /**
     * @return The Connection state of the Network Manager Scope Connection.
     * 
     */
    public Output<String> connectionState() {
        return this.connectionState;
    }
    /**
     * A description of the Network Manager Scope Connection.
     * 
     */
    @Export(name="description", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> description;

    /**
     * @return A description of the Network Manager Scope Connection.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created.
     * 
     */
    @Export(name="networkManagerId", refs={String.class}, tree="[0]")
    private Output<String> networkManagerId;

    /**
     * @return Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created.
     * 
     */
    public Output<String> networkManagerId() {
        return this.networkManagerId;
    }
    /**
     * Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID.
     * 
     */
    @Export(name="targetScopeId", refs={String.class}, tree="[0]")
    private Output<String> targetScopeId;

    /**
     * @return Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID.
     * 
     */
    public Output<String> targetScopeId() {
        return this.targetScopeId;
    }
    /**
     * Specifies the Tenant ID of the Resource which the Network Manager is connected to.
     * 
     */
    @Export(name="tenantId", refs={String.class}, tree="[0]")
    private Output<String> tenantId;

    /**
     * @return Specifies the Tenant ID of the Resource which the Network Manager is connected to.
     * 
     */
    public Output<String> tenantId() {
        return this.tenantId;
    }

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

    private NetworkManagerScopeConnection(String name, Output<String> id, @Nullable NetworkManagerScopeConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection", 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 NetworkManagerScopeConnection get(String name, Output<String> id, @Nullable NetworkManagerScopeConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new NetworkManagerScopeConnection(name, id, state, options);
    }
}
