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

com.pulumi.azurenative.blueprint.Assignment Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.blueprint;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
import com.pulumi.azurenative.blueprint.outputs.AssignmentLockSettingsResponse;
import com.pulumi.azurenative.blueprint.outputs.AssignmentStatusResponse;
import com.pulumi.azurenative.blueprint.outputs.ManagedServiceIdentityResponse;
import com.pulumi.azurenative.blueprint.outputs.ParameterValueResponse;
import com.pulumi.azurenative.blueprint.outputs.ResourceGroupValueResponse;
import com.pulumi.core.Alias;
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 java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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
 * 
 * 
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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",                 
 *                     "johnDoe}{@literal @}{@code contoso.com",
 *                     "johnsteam}{@literal @}{@code contoso.com")),
 *                 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());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### Assignment with system-assigned managed identity at subscription scope * *
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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",                 
 *                     "johnDoe}{@literal @}{@code contoso.com",
 *                     "johnsteam}{@literal @}{@code contoso.com")),
 *                 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());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### Assignment with user-assigned managed identity at management group scope * *
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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",                 
 *                     "johnDoe}{@literal @}{@code contoso.com",
 *                     "johnsteam}{@literal @}{@code contoso.com")),
 *                 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());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### Assignment with user-assigned managed identity at subscription scope * *
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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",                 
 *                     "johnDoe}{@literal @}{@code contoso.com",
 *                     "johnsteam}{@literal @}{@code contoso.com")),
 *                 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());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* * ## 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} * ``` * */ @ResourceType(type="azure-native:blueprint:Assignment") public class Assignment extends com.pulumi.resources.CustomResource { /** * ID of the published version of a blueprint definition. * */ @Export(name="blueprintId", refs={String.class}, tree="[0]") private Output blueprintId; /** * @return ID of the published version of a blueprint definition. * */ public Output> blueprintId() { return Codegen.optional(this.blueprintId); } /** * Multi-line explain this resource. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Multi-line explain this resource. * */ public Output> description() { return Codegen.optional(this.description); } /** * One-liner string explain this resource. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return One-liner string explain this resource. * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * Managed identity for this blueprint assignment. * */ @Export(name="identity", refs={ManagedServiceIdentityResponse.class}, tree="[0]") private Output identity; /** * @return Managed identity for this blueprint assignment. * */ public Output identity() { return this.identity; } /** * The location of this blueprint assignment. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The location of this blueprint assignment. * */ public Output location() { return this.location; } /** * Defines how resources deployed by a blueprint assignment are locked. * */ @Export(name="locks", refs={AssignmentLockSettingsResponse.class}, tree="[0]") private Output locks; /** * @return Defines how resources deployed by a blueprint assignment are locked. * */ public Output> locks() { return Codegen.optional(this.locks); } /** * Name of this resource. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of this resource. * */ public Output name() { return this.name; } /** * Blueprint assignment parameter values. * */ @Export(name="parameters", refs={Map.class,String.class,ParameterValueResponse.class}, tree="[0,1,2]") private Output> parameters; /** * @return Blueprint assignment parameter values. * */ public Output> parameters() { return this.parameters; } /** * State of the blueprint assignment. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return State of the blueprint assignment. * */ public Output provisioningState() { return this.provisioningState; } /** * Names and locations of resource group placeholders. * */ @Export(name="resourceGroups", refs={Map.class,String.class,ResourceGroupValueResponse.class}, tree="[0,1,2]") private Output> resourceGroups; /** * @return Names and locations of resource group placeholders. * */ public Output> resourceGroups() { return this.resourceGroups; } /** * The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required. * */ @Export(name="scope", refs={String.class}, tree="[0]") private Output scope; /** * @return The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required. * */ public Output> scope() { return Codegen.optional(this.scope); } /** * Status of blueprint assignment. This field is readonly. * */ @Export(name="status", refs={AssignmentStatusResponse.class}, tree="[0]") private Output status; /** * @return Status of blueprint assignment. This field is readonly. * */ public Output status() { return this.status; } /** * Type of this resource. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Type of this resource. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Assignment(java.lang.String name) { this(name, AssignmentArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Assignment(java.lang.String name, AssignmentArgs 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 Assignment(java.lang.String name, AssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:Assignment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Assignment(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:Assignment", name, null, makeResourceOptions(options, id), false); } private static AssignmentArgs makeArgs(AssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AssignmentArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:blueprint/v20181101preview:Assignment").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Assignment get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Assignment(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy