![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.network.kotlin.NetworkManagerSubscriptionConnectionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.NetworkManagerSubscriptionConnectionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Network Manager Subscription Connection which may cross tenants.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const current = azure.core.getSubscription({});
* const exampleNetworkManager = new azure.network.NetworkManager("example", {
* name: "example-networkmanager",
* location: example.location,
* resourceGroupName: example.name,
* scope: {
* subscriptionIds: [current.then(current => current.id)],
* },
* scopeAccesses: ["SecurityAdmin"],
* });
* const exampleNetworkManagerSubscriptionConnection = new azure.network.NetworkManagerSubscriptionConnection("example", {
* name: "example-nsnmc",
* subscriptionId: current.then(current => current.id),
* networkManagerId: exampleNetworkManager.id,
* description: "example",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* current = azure.core.get_subscription()
* example_network_manager = azure.network.NetworkManager("example",
* name="example-networkmanager",
* location=example.location,
* resource_group_name=example.name,
* scope={
* "subscription_ids": [current.id],
* },
* scope_accesses=["SecurityAdmin"])
* example_network_manager_subscription_connection = azure.network.NetworkManagerSubscriptionConnection("example",
* name="example-nsnmc",
* subscription_id=current.id,
* network_manager_id=example_network_manager.id,
* description="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var current = Azure.Core.GetSubscription.Invoke();
* var exampleNetworkManager = new Azure.Network.NetworkManager("example", new()
* {
* Name = "example-networkmanager",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
* {
* SubscriptionIds = new[]
* {
* current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
* },
* },
* ScopeAccesses = new[]
* {
* "SecurityAdmin",
* },
* });
* var exampleNetworkManagerSubscriptionConnection = new Azure.Network.NetworkManagerSubscriptionConnection("example", new()
* {
* Name = "example-nsnmc",
* SubscriptionId = current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
* NetworkManagerId = exampleNetworkManager.Id,
* Description = "example",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* current, err := core.LookupSubscription(ctx, nil, nil)
* if err != nil {
* return err
* }
* exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{
* Name: pulumi.String("example-networkmanager"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Scope: &network.NetworkManagerScopeArgs{
* SubscriptionIds: pulumi.StringArray{
* pulumi.String(current.Id),
* },
* },
* ScopeAccesses: pulumi.StringArray{
* pulumi.String("SecurityAdmin"),
* },
* })
* if err != nil {
* return err
* }
* _, err = network.NewNetworkManagerSubscriptionConnection(ctx, "example", &network.NetworkManagerSubscriptionConnectionArgs{
* Name: pulumi.String("example-nsnmc"),
* SubscriptionId: pulumi.String(current.Id),
* NetworkManagerId: exampleNetworkManager.ID(),
* Description: pulumi.String("example"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```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.NetworkManagerSubscriptionConnection;
* import com.pulumi.azure.network.NetworkManagerSubscriptionConnectionArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* final var current = CoreFunctions.getSubscription();
* var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
* .name("example-networkmanager")
* .location(example.location())
* .resourceGroupName(example.name())
* .scope(NetworkManagerScopeArgs.builder()
* .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
* .build())
* .scopeAccesses("SecurityAdmin")
* .build());
* var exampleNetworkManagerSubscriptionConnection = new NetworkManagerSubscriptionConnection("exampleNetworkManagerSubscriptionConnection", NetworkManagerSubscriptionConnectionArgs.builder()
* .name("example-nsnmc")
* .subscriptionId(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
* .networkManagerId(exampleNetworkManager.id())
* .description("example")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleNetworkManager:
* type: azure:network:NetworkManager
* name: example
* properties:
* name: example-networkmanager
* location: ${example.location}
* resourceGroupName: ${example.name}
* scope:
* subscriptionIds:
* - ${current.id}
* scopeAccesses:
* - SecurityAdmin
* exampleNetworkManagerSubscriptionConnection:
* type: azure:network:NetworkManagerSubscriptionConnection
* name: example
* properties:
* name: example-nsnmc
* subscriptionId: ${current.id}
* networkManagerId: ${exampleNetworkManager.id}
* description: example
* variables:
* current:
* fn::invoke:
* Function: azure:core:getSubscription
* Arguments: {}
* ```
*
* ## Import
* Network Subscription Network Manager Connection can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/networkManagerSubscriptionConnection:NetworkManagerSubscriptionConnection example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkManagerConnections/networkManagerConnection1
* ```
* @property description A description of the Network Manager Subscription Connection.
* @property name Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created.
* @property networkManagerId Specifies the ID of the Network Manager which the Subscription is connected to.
* @property subscriptionId Specifies the ID of the target Subscription. Changing this forces a new resource to be created.
*/
public data class NetworkManagerSubscriptionConnectionArgs(
public val description: Output? = null,
public val name: Output? = null,
public val networkManagerId: Output? = null,
public val subscriptionId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.NetworkManagerSubscriptionConnectionArgs =
com.pulumi.azure.network.NetworkManagerSubscriptionConnectionArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.networkManagerId(networkManagerId?.applyValue({ args0 -> args0 }))
.subscriptionId(subscriptionId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [NetworkManagerSubscriptionConnectionArgs].
*/
@PulumiTagMarker
public class NetworkManagerSubscriptionConnectionArgsBuilder internal constructor() {
private var description: Output? = null
private var name: Output? = null
private var networkManagerId: Output? = null
private var subscriptionId: Output? = null
/**
* @param value A description of the Network Manager Subscription Connection.
*/
@JvmName("uvmqfkwbykiunhqu")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created.
*/
@JvmName("mfowrxtgtnqhopts")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the ID of the Network Manager which the Subscription is connected to.
*/
@JvmName("gunlxxoepnqnmbxj")
public suspend fun networkManagerId(`value`: Output) {
this.networkManagerId = value
}
/**
* @param value Specifies the ID of the target Subscription. Changing this forces a new resource to be created.
*/
@JvmName("vxxxcsaxbvuucfyl")
public suspend fun subscriptionId(`value`: Output) {
this.subscriptionId = value
}
/**
* @param value A description of the Network Manager Subscription Connection.
*/
@JvmName("cwftvwmgqrcxhnep")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created.
*/
@JvmName("sjkavwfvokxrctos")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Specifies the ID of the Network Manager which the Subscription is connected to.
*/
@JvmName("sdryqxgcpwgvgnch")
public suspend fun networkManagerId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkManagerId = mapped
}
/**
* @param value Specifies the ID of the target Subscription. Changing this forces a new resource to be created.
*/
@JvmName("muoqgjcyldrqlcyg")
public suspend fun subscriptionId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subscriptionId = mapped
}
internal fun build(): NetworkManagerSubscriptionConnectionArgs =
NetworkManagerSubscriptionConnectionArgs(
description = description,
name = name,
networkManagerId = networkManagerId,
subscriptionId = subscriptionId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy