com.pulumi.azure.management.kotlin.PrivateLinkAssociationArgs.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.management.kotlin
import com.pulumi.azure.management.PrivateLinkAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Resource Management Private Link Association.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as random from "@pulumi/random";
* const example = azure.core.getClientConfig({});
* const exampleGetGroup = example.then(example => azure.management.getGroup({
* name: example.tenantId,
* }));
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example",
* location: "West Europe",
* });
* const examplePrivateLink = new azure.management.PrivateLink("example", {
* name: "example",
* resourceGroupName: exampleResourceGroup.name,
* location: exampleResourceGroup.location,
* });
* const exampleRandomUuid = new random.RandomUuid("example", {});
* const examplePrivateLinkAssociation = new azure.management.PrivateLinkAssociation("example", {
* name: exampleRandomUuid.result,
* managementGroupId: exampleAzurermManagementGroup.id,
* resourceManagementPrivateLinkId: examplePrivateLink.id,
* publicNetworkAccessEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_random as random
* example = azure.core.get_client_config()
* example_get_group = azure.management.get_group(name=example.tenant_id)
* example_resource_group = azure.core.ResourceGroup("example",
* name="example",
* location="West Europe")
* example_private_link = azure.management.PrivateLink("example",
* name="example",
* resource_group_name=example_resource_group.name,
* location=example_resource_group.location)
* example_random_uuid = random.RandomUuid("example")
* example_private_link_association = azure.management.PrivateLinkAssociation("example",
* name=example_random_uuid.result,
* management_group_id=example_azurerm_management_group["id"],
* resource_management_private_link_id=example_private_link.id,
* public_network_access_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using Random = Pulumi.Random;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Core.GetClientConfig.Invoke();
* var exampleGetGroup = Azure.Management.GetGroup.Invoke(new()
* {
* Name = example.Apply(getClientConfigResult => getClientConfigResult.TenantId),
* });
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example",
* Location = "West Europe",
* });
* var examplePrivateLink = new Azure.Management.PrivateLink("example", new()
* {
* Name = "example",
* ResourceGroupName = exampleResourceGroup.Name,
* Location = exampleResourceGroup.Location,
* });
* var exampleRandomUuid = new Random.RandomUuid("example");
* var examplePrivateLinkAssociation = new Azure.Management.PrivateLinkAssociation("example", new()
* {
* Name = exampleRandomUuid.Result,
* ManagementGroupId = exampleAzurermManagementGroup.Id,
* ResourceManagementPrivateLinkId = examplePrivateLink.Id,
* PublicNetworkAccessEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
* "github.com/pulumi/pulumi-random/sdk/v4/go/random"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* _, err = management.LookupGroup(ctx, &management.LookupGroupArgs{
* Name: pulumi.StringRef(example.TenantId),
* }, nil)
* if err != nil {
* return err
* }
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* examplePrivateLink, err := management.NewPrivateLink(ctx, "example", &management.PrivateLinkArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: exampleResourceGroup.Name,
* Location: exampleResourceGroup.Location,
* })
* if err != nil {
* return err
* }
* exampleRandomUuid, err := random.NewRandomUuid(ctx, "example", nil)
* if err != nil {
* return err
* }
* _, err = management.NewPrivateLinkAssociation(ctx, "example", &management.PrivateLinkAssociationArgs{
* Name: exampleRandomUuid.Result,
* ManagementGroupId: pulumi.Any(exampleAzurermManagementGroup.Id),
* ResourceManagementPrivateLinkId: examplePrivateLink.ID(),
* PublicNetworkAccessEnabled: pulumi.Bool(true),
* })
* 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.CoreFunctions;
* import com.pulumi.azure.management.ManagementFunctions;
* import com.pulumi.azure.management.inputs.GetGroupArgs;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.management.PrivateLink;
* import com.pulumi.azure.management.PrivateLinkArgs;
* import com.pulumi.random.RandomUuid;
* import com.pulumi.azure.management.PrivateLinkAssociation;
* import com.pulumi.azure.management.PrivateLinkAssociationArgs;
* 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) {
* final var example = CoreFunctions.getClientConfig();
* final var exampleGetGroup = ManagementFunctions.getGroup(GetGroupArgs.builder()
* .name(example.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
* .build());
* var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example")
* .location("West Europe")
* .build());
* var examplePrivateLink = new PrivateLink("examplePrivateLink", PrivateLinkArgs.builder()
* .name("example")
* .resourceGroupName(exampleResourceGroup.name())
* .location(exampleResourceGroup.location())
* .build());
* var exampleRandomUuid = new RandomUuid("exampleRandomUuid");
* var examplePrivateLinkAssociation = new PrivateLinkAssociation("examplePrivateLinkAssociation", PrivateLinkAssociationArgs.builder()
* .name(exampleRandomUuid.result())
* .managementGroupId(exampleAzurermManagementGroup.id())
* .resourceManagementPrivateLinkId(examplePrivateLink.id())
* .publicNetworkAccessEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example
* location: West Europe
* examplePrivateLink:
* type: azure:management:PrivateLink
* name: example
* properties:
* name: example
* resourceGroupName: ${exampleResourceGroup.name}
* location: ${exampleResourceGroup.location}
* exampleRandomUuid:
* type: random:RandomUuid
* name: example
* examplePrivateLinkAssociation:
* type: azure:management:PrivateLinkAssociation
* name: example
* properties:
* name: ${exampleRandomUuid.result}
* managementGroupId: ${exampleAzurermManagementGroup.id}
* resourceManagementPrivateLinkId: ${examplePrivateLink.id}
* publicNetworkAccessEnabled: true
* variables:
* example:
* fn::invoke:
* Function: azure:core:getClientConfig
* Arguments: {}
* exampleGetGroup:
* fn::invoke:
* Function: azure:management:getGroup
* Arguments:
* name: ${example.tenantId}
* ```
*
* ## Import
* An existing Private Link Association can be imported into Terraform using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:management/privateLinkAssociation:PrivateLinkAssociation example /providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/privateLinkAssociations/00000000-0000-0000-0000-000000000000
* ```
* @property managementGroupId Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
* > **Note:** For now, `management_group_id` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
* @property name Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignore_changes` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.management.PrivateLinkAssociation("example", {
* managementGroupId: exampleAzurermManagementGroup.id,
* resourceManagementPrivateLinkId: exampleAzurermResourceManagementPrivateLink.id,
* publicNetworkAccessEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.management.PrivateLinkAssociation("example",
* management_group_id=example_azurerm_management_group["id"],
* resource_management_private_link_id=example_azurerm_resource_management_private_link["id"],
* public_network_access_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Management.PrivateLinkAssociation("example", new()
* {
* ManagementGroupId = exampleAzurermManagementGroup.Id,
* ResourceManagementPrivateLinkId = exampleAzurermResourceManagementPrivateLink.Id,
* PublicNetworkAccessEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := management.NewPrivateLinkAssociation(ctx, "example", &management.PrivateLinkAssociationArgs{
* ManagementGroupId: pulumi.Any(exampleAzurermManagementGroup.Id),
* ResourceManagementPrivateLinkId: pulumi.Any(exampleAzurermResourceManagementPrivateLink.Id),
* PublicNetworkAccessEnabled: pulumi.Bool(true),
* })
* 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.management.PrivateLinkAssociation;
* import com.pulumi.azure.management.PrivateLinkAssociationArgs;
* 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 PrivateLinkAssociation("example", PrivateLinkAssociationArgs.builder()
* .managementGroupId(exampleAzurermManagementGroup.id())
* .resourceManagementPrivateLinkId(exampleAzurermResourceManagementPrivateLink.id())
* .publicNetworkAccessEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:management:PrivateLinkAssociation
* properties:
* managementGroupId: ${exampleAzurermManagementGroup.id}
* resourceManagementPrivateLinkId: ${exampleAzurermResourceManagementPrivateLink.id}
* publicNetworkAccessEnabled: true
* ```
*
* @property publicNetworkAccessEnabled Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
* @property resourceManagementPrivateLinkId The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
*/
public data class PrivateLinkAssociationArgs(
public val managementGroupId: Output? = null,
public val name: Output? = null,
public val publicNetworkAccessEnabled: Output? = null,
public val resourceManagementPrivateLinkId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.management.PrivateLinkAssociationArgs =
com.pulumi.azure.management.PrivateLinkAssociationArgs.builder()
.managementGroupId(managementGroupId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
.resourceManagementPrivateLinkId(
resourceManagementPrivateLinkId?.applyValue({ args0 ->
args0
}),
).build()
}
/**
* Builder for [PrivateLinkAssociationArgs].
*/
@PulumiTagMarker
public class PrivateLinkAssociationArgsBuilder internal constructor() {
private var managementGroupId: Output? = null
private var name: Output? = null
private var publicNetworkAccessEnabled: Output? = null
private var resourceManagementPrivateLinkId: Output? = null
/**
* @param value Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
* > **Note:** For now, `management_group_id` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
*/
@JvmName("bxvtgahuwiwgomaf")
public suspend fun managementGroupId(`value`: Output) {
this.managementGroupId = value
}
/**
* @param value Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignore_changes` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.management.PrivateLinkAssociation("example", {
* managementGroupId: exampleAzurermManagementGroup.id,
* resourceManagementPrivateLinkId: exampleAzurermResourceManagementPrivateLink.id,
* publicNetworkAccessEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.management.PrivateLinkAssociation("example",
* management_group_id=example_azurerm_management_group["id"],
* resource_management_private_link_id=example_azurerm_resource_management_private_link["id"],
* public_network_access_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Management.PrivateLinkAssociation("example", new()
* {
* ManagementGroupId = exampleAzurermManagementGroup.Id,
* ResourceManagementPrivateLinkId = exampleAzurermResourceManagementPrivateLink.Id,
* PublicNetworkAccessEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := management.NewPrivateLinkAssociation(ctx, "example", &management.PrivateLinkAssociationArgs{
* ManagementGroupId: pulumi.Any(exampleAzurermManagementGroup.Id),
* ResourceManagementPrivateLinkId: pulumi.Any(exampleAzurermResourceManagementPrivateLink.Id),
* PublicNetworkAccessEnabled: pulumi.Bool(true),
* })
* 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.management.PrivateLinkAssociation;
* import com.pulumi.azure.management.PrivateLinkAssociationArgs;
* 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 PrivateLinkAssociation("example", PrivateLinkAssociationArgs.builder()
* .managementGroupId(exampleAzurermManagementGroup.id())
* .resourceManagementPrivateLinkId(exampleAzurermResourceManagementPrivateLink.id())
* .publicNetworkAccessEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:management:PrivateLinkAssociation
* properties:
* managementGroupId: ${exampleAzurermManagementGroup.id}
* resourceManagementPrivateLinkId: ${exampleAzurermResourceManagementPrivateLink.id}
* publicNetworkAccessEnabled: true
* ```
*
*/
@JvmName("oqgvbxrnusonpvke")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
*/
@JvmName("uathvkuexdjalcja")
public suspend fun publicNetworkAccessEnabled(`value`: Output) {
this.publicNetworkAccessEnabled = value
}
/**
* @param value The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
*/
@JvmName("pioxxlkdidxlxxtv")
public suspend fun resourceManagementPrivateLinkId(`value`: Output) {
this.resourceManagementPrivateLinkId = value
}
/**
* @param value Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
* > **Note:** For now, `management_group_id` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
*/
@JvmName("fjymxfttknosbaiq")
public suspend fun managementGroupId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managementGroupId = mapped
}
/**
* @param value Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignore_changes` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.management.PrivateLinkAssociation("example", {
* managementGroupId: exampleAzurermManagementGroup.id,
* resourceManagementPrivateLinkId: exampleAzurermResourceManagementPrivateLink.id,
* publicNetworkAccessEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.management.PrivateLinkAssociation("example",
* management_group_id=example_azurerm_management_group["id"],
* resource_management_private_link_id=example_azurerm_resource_management_private_link["id"],
* public_network_access_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Management.PrivateLinkAssociation("example", new()
* {
* ManagementGroupId = exampleAzurermManagementGroup.Id,
* ResourceManagementPrivateLinkId = exampleAzurermResourceManagementPrivateLink.Id,
* PublicNetworkAccessEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := management.NewPrivateLinkAssociation(ctx, "example", &management.PrivateLinkAssociationArgs{
* ManagementGroupId: pulumi.Any(exampleAzurermManagementGroup.Id),
* ResourceManagementPrivateLinkId: pulumi.Any(exampleAzurermResourceManagementPrivateLink.Id),
* PublicNetworkAccessEnabled: pulumi.Bool(true),
* })
* 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.management.PrivateLinkAssociation;
* import com.pulumi.azure.management.PrivateLinkAssociationArgs;
* 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 PrivateLinkAssociation("example", PrivateLinkAssociationArgs.builder()
* .managementGroupId(exampleAzurermManagementGroup.id())
* .resourceManagementPrivateLinkId(exampleAzurermResourceManagementPrivateLink.id())
* .publicNetworkAccessEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:management:PrivateLinkAssociation
* properties:
* managementGroupId: ${exampleAzurermManagementGroup.id}
* resourceManagementPrivateLinkId: ${exampleAzurermResourceManagementPrivateLink.id}
* publicNetworkAccessEnabled: true
* ```
*
*/
@JvmName("unndngthfhqxiulu")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
*/
@JvmName("wavugbtapgppspyi")
public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccessEnabled = mapped
}
/**
* @param value The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
*/
@JvmName("ixgdlnwrntoxxydh")
public suspend fun resourceManagementPrivateLinkId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceManagementPrivateLinkId = mapped
}
internal fun build(): PrivateLinkAssociationArgs = PrivateLinkAssociationArgs(
managementGroupId = managementGroupId,
name = name,
publicNetworkAccessEnabled = publicNetworkAccessEnabled,
resourceManagementPrivateLinkId = resourceManagementPrivateLinkId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy