com.pulumi.azurenative.blueprint.Assignment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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* @Nullable */ String> 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* @Nullable */ String> 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* @Nullable */ String> 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* @Nullable */ AssignmentLockSettingsResponse> 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
© 2015 - 2024 Weber Informatics LLC | Privacy Policy