All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.blueprint.kotlin.AssignmentArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.blueprint.kotlin

import com.pulumi.azurenative.blueprint.AssignmentArgs.builder
import com.pulumi.azurenative.blueprint.kotlin.inputs.AssignmentLockSettingsArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.AssignmentLockSettingsArgsBuilder
import com.pulumi.azurenative.blueprint.kotlin.inputs.ManagedServiceIdentityArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.ManagedServiceIdentityArgsBuilder
import com.pulumi.azurenative.blueprint.kotlin.inputs.ParameterValueArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.ParameterValueArgsBuilder
import com.pulumi.azurenative.blueprint.kotlin.inputs.ResourceGroupValueArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.ResourceGroupValueArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Represents a blueprint assignment.
 * Azure REST API version: 2018-11-01-preview. Prior API version in Azure Native 1.x: 2018-11-01-preview.
 * Other available API versions: 2017-11-11-preview.
 * ## Example Usage
 * ### Assignment with system-assigned managed identity at management group scope
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
 *     {
 *         AssignmentName = "assignSimpleBlueprint",
 *         BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
 *         Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
 *         Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
 *         {
 *             Type = AzureNative.Blueprint.ManagedServiceIdentityType.SystemAssigned,
 *         },
 *         Location = "eastus",
 *         Parameters =
 *         {
 *             { "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Contoso/Online/Shopping/Production",
 *             } },
 *             { "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = new[]
 *                 {
 *                     "[email protected]",
 *                     "[email protected]",
 *                 },
 *             } },
 *             { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Standard_LRS",
 *             } },
 *         },
 *         ResourceGroups =
 *         {
 *             { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
 *             {
 *                 Location = "eastus",
 *                 Name = "defaultRG",
 *             } },
 *         },
 *         ResourceScope = "managementGroups/ContosoOnlineGroup",
 *         Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
 * 			AssignmentName: pulumi.String("assignSimpleBlueprint"),
 * 			BlueprintId:    pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
 * 			Description:    pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
 * 			Identity: &blueprint.ManagedServiceIdentityArgs{
 * 				Type: pulumi.String(blueprint.ManagedServiceIdentityTypeSystemAssigned),
 * 			},
 * 			Location: pulumi.String("eastus"),
 * 			Parameters: blueprint.ParameterValueMap{
 * 				"costCenter": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Contoso/Online/Shopping/Production"),
 * 				},
 * 				"owners": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any{
 * 						"[email protected]",
 * 						"[email protected]",
 * 					},
 * 				},
 * 				"storageAccountType": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Standard_LRS"),
 * 				},
 * 			},
 * 			ResourceGroups: blueprint.ResourceGroupValueMap{
 * 				"storageRG": &blueprint.ResourceGroupValueArgs{
 * 					Location: pulumi.String("eastus"),
 * 					Name:     pulumi.String("defaultRG"),
 * 				},
 * 			},
 * 			ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
 * 			Scope:         pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
 * 		})
 * 		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.azurenative.blueprint.Assignment;
 * import com.pulumi.azurenative.blueprint.AssignmentArgs;
 * import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .assignmentName("assignSimpleBlueprint")
 *             .blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
 *             .description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
 *             .identity(ManagedServiceIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .location("eastus")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
 *                 Map.entry("owners", Map.of("value",
 *                     "[email protected]",
 *                     "[email protected]")),
 *                 Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("location", "eastus"),
 *                 Map.entry("name", "defaultRG")
 *             )))
 *             .resourceScope("managementGroups/ContosoOnlineGroup")
 *             .scope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .build());
 *     }
 * }
 * ```
 * ### Assignment with system-assigned managed identity at subscription scope
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
 *     {
 *         AssignmentName = "assignSimpleBlueprint",
 *         BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
 *         Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
 *         Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
 *         {
 *             Type = AzureNative.Blueprint.ManagedServiceIdentityType.SystemAssigned,
 *         },
 *         Location = "eastus",
 *         Parameters =
 *         {
 *             { "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Contoso/Online/Shopping/Production",
 *             } },
 *             { "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = new[]
 *                 {
 *                     "[email protected]",
 *                     "[email protected]",
 *                 },
 *             } },
 *             { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Standard_LRS",
 *             } },
 *         },
 *         ResourceGroups =
 *         {
 *             { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
 *             {
 *                 Location = "eastus",
 *                 Name = "defaultRG",
 *             } },
 *         },
 *         ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
 * 			AssignmentName: pulumi.String("assignSimpleBlueprint"),
 * 			BlueprintId:    pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
 * 			Description:    pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
 * 			Identity: &blueprint.ManagedServiceIdentityArgs{
 * 				Type: pulumi.String(blueprint.ManagedServiceIdentityTypeSystemAssigned),
 * 			},
 * 			Location: pulumi.String("eastus"),
 * 			Parameters: blueprint.ParameterValueMap{
 * 				"costCenter": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Contoso/Online/Shopping/Production"),
 * 				},
 * 				"owners": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any{
 * 						"[email protected]",
 * 						"[email protected]",
 * 					},
 * 				},
 * 				"storageAccountType": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Standard_LRS"),
 * 				},
 * 			},
 * 			ResourceGroups: blueprint.ResourceGroupValueMap{
 * 				"storageRG": &blueprint.ResourceGroupValueArgs{
 * 					Location: pulumi.String("eastus"),
 * 					Name:     pulumi.String("defaultRG"),
 * 				},
 * 			},
 * 			ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
 * 		})
 * 		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.azurenative.blueprint.Assignment;
 * import com.pulumi.azurenative.blueprint.AssignmentArgs;
 * import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .assignmentName("assignSimpleBlueprint")
 *             .blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
 *             .description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
 *             .identity(ManagedServiceIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .location("eastus")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
 *                 Map.entry("owners", Map.of("value",
 *                     "[email protected]",
 *                     "[email protected]")),
 *                 Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("location", "eastus"),
 *                 Map.entry("name", "defaultRG")
 *             )))
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .build());
 *     }
 * }
 * ```
 * ### Assignment with user-assigned managed identity at management group scope
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
 *     {
 *         AssignmentName = "assignSimpleBlueprint",
 *         BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
 *         Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
 *         Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
 *         {
 *             Type = AzureNative.Blueprint.ManagedServiceIdentityType.UserAssigned,
 *             UserAssignedIdentities =
 *             {
 *                 { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
 *             },
 *         },
 *         Location = "eastus",
 *         Parameters =
 *         {
 *             { "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Contoso/Online/Shopping/Production",
 *             } },
 *             { "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = new[]
 *                 {
 *                     "[email protected]",
 *                     "[email protected]",
 *                 },
 *             } },
 *             { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Standard_LRS",
 *             } },
 *         },
 *         ResourceGroups =
 *         {
 *             { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
 *             {
 *                 Location = "eastus",
 *                 Name = "defaultRG",
 *             } },
 *         },
 *         ResourceScope = "managementGroups/ContosoOnlineGroup",
 *         Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
 * 			AssignmentName: pulumi.String("assignSimpleBlueprint"),
 * 			BlueprintId:    pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
 * 			Description:    pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
 * 			Identity: &blueprint.ManagedServiceIdentityArgs{
 * 				Type: pulumi.String(blueprint.ManagedServiceIdentityTypeUserAssigned),
 * 				UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
 * 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": nil,
 * 				},
 * 			},
 * 			Location: pulumi.String("eastus"),
 * 			Parameters: blueprint.ParameterValueMap{
 * 				"costCenter": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Contoso/Online/Shopping/Production"),
 * 				},
 * 				"owners": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any{
 * 						"[email protected]",
 * 						"[email protected]",
 * 					},
 * 				},
 * 				"storageAccountType": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Standard_LRS"),
 * 				},
 * 			},
 * 			ResourceGroups: blueprint.ResourceGroupValueMap{
 * 				"storageRG": &blueprint.ResourceGroupValueArgs{
 * 					Location: pulumi.String("eastus"),
 * 					Name:     pulumi.String("defaultRG"),
 * 				},
 * 			},
 * 			ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
 * 			Scope:         pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
 * 		})
 * 		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.azurenative.blueprint.Assignment;
 * import com.pulumi.azurenative.blueprint.AssignmentArgs;
 * import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .assignmentName("assignSimpleBlueprint")
 *             .blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
 *             .description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
 *             .identity(ManagedServiceIdentityArgs.builder()
 *                 .type("UserAssigned")
 *                 .userAssignedIdentities(Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
 *                 .build())
 *             .location("eastus")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
 *                 Map.entry("owners", Map.of("value",
 *                     "[email protected]",
 *                     "[email protected]")),
 *                 Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("location", "eastus"),
 *                 Map.entry("name", "defaultRG")
 *             )))
 *             .resourceScope("managementGroups/ContosoOnlineGroup")
 *             .scope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .build());
 *     }
 * }
 * ```
 * ### Assignment with user-assigned managed identity at subscription scope
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
 *     {
 *         AssignmentName = "assignSimpleBlueprint",
 *         BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
 *         Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
 *         Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
 *         {
 *             Type = AzureNative.Blueprint.ManagedServiceIdentityType.UserAssigned,
 *             UserAssignedIdentities =
 *             {
 *                 { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
 *             },
 *         },
 *         Location = "eastus",
 *         Parameters =
 *         {
 *             { "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Contoso/Online/Shopping/Production",
 *             } },
 *             { "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = new[]
 *                 {
 *                     "[email protected]",
 *                     "[email protected]",
 *                 },
 *             } },
 *             { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
 *             {
 *                 Value = "Standard_LRS",
 *             } },
 *         },
 *         ResourceGroups =
 *         {
 *             { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
 *             {
 *                 Location = "eastus",
 *                 Name = "defaultRG",
 *             } },
 *         },
 *         ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
 * 			AssignmentName: pulumi.String("assignSimpleBlueprint"),
 * 			BlueprintId:    pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
 * 			Description:    pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
 * 			Identity: &blueprint.ManagedServiceIdentityArgs{
 * 				Type: pulumi.String(blueprint.ManagedServiceIdentityTypeUserAssigned),
 * 				UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
 * 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": nil,
 * 				},
 * 			},
 * 			Location: pulumi.String("eastus"),
 * 			Parameters: blueprint.ParameterValueMap{
 * 				"costCenter": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Contoso/Online/Shopping/Production"),
 * 				},
 * 				"owners": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any{
 * 						"[email protected]",
 * 						"[email protected]",
 * 					},
 * 				},
 * 				"storageAccountType": &blueprint.ParameterValueArgs{
 * 					Value: pulumi.Any("Standard_LRS"),
 * 				},
 * 			},
 * 			ResourceGroups: blueprint.ResourceGroupValueMap{
 * 				"storageRG": &blueprint.ResourceGroupValueArgs{
 * 					Location: pulumi.String("eastus"),
 * 					Name:     pulumi.String("defaultRG"),
 * 				},
 * 			},
 * 			ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
 * 		})
 * 		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.azurenative.blueprint.Assignment;
 * import com.pulumi.azurenative.blueprint.AssignmentArgs;
 * import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .assignmentName("assignSimpleBlueprint")
 *             .blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
 *             .description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
 *             .identity(ManagedServiceIdentityArgs.builder()
 *                 .type("UserAssigned")
 *                 .userAssignedIdentities(Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
 *                 .build())
 *             .location("eastus")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
 *                 Map.entry("owners", Map.of("value",
 *                     "[email protected]",
 *                     "[email protected]")),
 *                 Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("location", "eastus"),
 *                 Map.entry("name", "defaultRG")
 *             )))
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:blueprint:Assignment assignSimpleBlueprint /{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}
 * ```
 * @property assignmentName Name of the blueprint assignment.
 * @property blueprintId ID of the published version of a blueprint definition.
 * @property description Multi-line explain this resource.
 * @property displayName One-liner string explain this resource.
 * @property identity Managed identity for this blueprint assignment.
 * @property location The location of this blueprint assignment.
 * @property locks Defines how resources deployed by a blueprint assignment are locked.
 * @property parameters Blueprint assignment parameter values.
 * @property resourceGroups Names and locations of resource group placeholders.
 * @property resourceScope The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
 * @property scope The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required.
 */
public data class AssignmentArgs(
    public val assignmentName: Output? = null,
    public val blueprintId: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val locks: Output? = null,
    public val parameters: Output>? = null,
    public val resourceGroups: Output>? = null,
    public val resourceScope: Output? = null,
    public val scope: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.blueprint.AssignmentArgs =
        com.pulumi.azurenative.blueprint.AssignmentArgs.builder()
            .assignmentName(assignmentName?.applyValue({ args0 -> args0 }))
            .blueprintId(blueprintId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .locks(locks?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .resourceGroups(
                resourceGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .resourceScope(resourceScope?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AssignmentArgs].
 */
@PulumiTagMarker
public class AssignmentArgsBuilder internal constructor() {
    private var assignmentName: Output? = null

    private var blueprintId: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var locks: Output? = null

    private var parameters: Output>? = null

    private var resourceGroups: Output>? = null

    private var resourceScope: Output? = null

    private var scope: Output? = null

    /**
     * @param value Name of the blueprint assignment.
     */
    @JvmName("swkmhokkewftochu")
    public suspend fun assignmentName(`value`: Output) {
        this.assignmentName = value
    }

    /**
     * @param value ID of the published version of a blueprint definition.
     */
    @JvmName("jifrsvyfxogrtlmx")
    public suspend fun blueprintId(`value`: Output) {
        this.blueprintId = value
    }

    /**
     * @param value Multi-line explain this resource.
     */
    @JvmName("iluucxbayxwciinn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value One-liner string explain this resource.
     */
    @JvmName("phyyvontwsswfldy")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Managed identity for this blueprint assignment.
     */
    @JvmName("gdliqejgvdidtcds")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The location of this blueprint assignment.
     */
    @JvmName("yroaardecgsrfmsg")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Defines how resources deployed by a blueprint assignment are locked.
     */
    @JvmName("shxidyuyjwgmvecc")
    public suspend fun locks(`value`: Output) {
        this.locks = value
    }

    /**
     * @param value Blueprint assignment parameter values.
     */
    @JvmName("qgssjondutecypex")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value Names and locations of resource group placeholders.
     */
    @JvmName("gxlvtgprxexndytm")
    public suspend fun resourceGroups(`value`: Output>) {
        this.resourceGroups = value
    }

    /**
     * @param value The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
     */
    @JvmName("ovttorrcemswegdx")
    public suspend fun resourceScope(`value`: Output) {
        this.resourceScope = value
    }

    /**
     * @param value The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required.
     */
    @JvmName("cnhgnmgegyrcybqo")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Name of the blueprint assignment.
     */
    @JvmName("fmofubeipgwoskmq")
    public suspend fun assignmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assignmentName = mapped
    }

    /**
     * @param value ID of the published version of a blueprint definition.
     */
    @JvmName("spenfqcwfayvvubt")
    public suspend fun blueprintId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blueprintId = mapped
    }

    /**
     * @param value Multi-line explain this resource.
     */
    @JvmName("hdhlqwjjyxqcljtu")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value One-liner string explain this resource.
     */
    @JvmName("ubhpdiexnpxssmbr")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Managed identity for this blueprint assignment.
     */
    @JvmName("yjluqomwwxpjxwqn")
    public suspend fun identity(`value`: ManagedServiceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument Managed identity for this blueprint assignment.
     */
    @JvmName("rljwfbenilixkjlu")
    public suspend fun identity(argument: suspend ManagedServiceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ManagedServiceIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The location of this blueprint assignment.
     */
    @JvmName("lfgwtqmpwdaulhjb")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Defines how resources deployed by a blueprint assignment are locked.
     */
    @JvmName("yqaupjepryhwxvxn")
    public suspend fun locks(`value`: AssignmentLockSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.locks = mapped
    }

    /**
     * @param argument Defines how resources deployed by a blueprint assignment are locked.
     */
    @JvmName("dmnvgefpavevdklc")
    public suspend fun locks(argument: suspend AssignmentLockSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = AssignmentLockSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.locks = mapped
    }

    /**
     * @param value Blueprint assignment parameter values.
     */
    @JvmName("cacjhafbyjqgmgnx")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument Blueprint assignment parameter values.
     */
    @JvmName("ejymwdcfqjgneopu")
    public suspend fun parameters(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ParameterValueArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values Blueprint assignment parameter values.
     */
    @JvmName("jybyitlfkoechqna")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value Names and locations of resource group placeholders.
     */
    @JvmName("ccvdrscdstyqvkib")
    public suspend fun resourceGroups(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroups = mapped
    }

    /**
     * @param argument Names and locations of resource group placeholders.
     */
    @JvmName("hqdwnuvwwrrwpynx")
    public suspend fun resourceGroups(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ResourceGroupValueArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.resourceGroups = mapped
    }

    /**
     * @param values Names and locations of resource group placeholders.
     */
    @JvmName("rfepahtjffrpybyu")
    public fun resourceGroups(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceGroups = mapped
    }

    /**
     * @param value The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
     */
    @JvmName("jjdbinhrubqadcgn")
    public suspend fun resourceScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceScope = mapped
    }

    /**
     * @param value The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required.
     */
    @JvmName("nqwefofhyihxughv")
    public suspend fun scope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    internal fun build(): AssignmentArgs = AssignmentArgs(
        assignmentName = assignmentName,
        blueprintId = blueprintId,
        description = description,
        displayName = displayName,
        identity = identity,
        location = location,
        locks = locks,
        parameters = parameters,
        resourceGroups = resourceGroups,
        resourceScope = resourceScope,
        scope = scope,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy