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

com.pulumi.azurenative.blueprint.Blueprint 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.BlueprintArgs;
import com.pulumi.azurenative.blueprint.outputs.BlueprintStatusResponse;
import com.pulumi.azurenative.blueprint.outputs.ParameterDefinitionResponse;
import com.pulumi.azurenative.blueprint.outputs.ResourceGroupDefinitionResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Represents a Blueprint definition.
 * 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
 * ### ManagementGroupBlueprint
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.Blueprint;
 * import com.pulumi.azurenative.blueprint.BlueprintArgs;
 * 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
 *             .blueprintName("simpleBlueprint")
 *             .description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.ofEntries(
 *                     Map.entry("displayName", "force cost center tag for all resources under given subscription."),
 *                     Map.entry("type", "string")
 *                 )),
 *                 Map.entry("owners", Map.ofEntries(
 *                     Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
 *                     Map.entry("type", "array")
 *                 )),
 *                 Map.entry("storageAccountType", Map.ofEntries(
 *                     Map.entry("displayName", "storage account type."),
 *                     Map.entry("type", "string")
 *                 ))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
 *                 Map.entry("displayName", "storage resource group")
 *             )))
 *             .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
 *             .targetScope("subscription")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### ResourceGroupWithTags * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.Blueprint;
 * import com.pulumi.azurenative.blueprint.BlueprintArgs;
 * 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
 *             .blueprintName("simpleBlueprint")
 *             .description("An example blueprint containing an RG with two tags.")
 *             .resourceGroups(Map.of("myRGName", Map.ofEntries(
 *                 Map.entry("displayName", "My Resource Group"),
 *                 Map.entry("location", "westus"),
 *                 Map.entry("name", "myRGName"),
 *                 Map.entry("tags", Map.ofEntries(
 *                     Map.entry("costcenter", "123456"),
 *                     Map.entry("nameOnlyTag", "")
 *                 ))
 *             )))
 *             .resourceScope("providers/Microsoft.Management/managementGroups/{ManagementGroupId}")
 *             .targetScope("subscription")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### SubscriptionBlueprint * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.Blueprint;
 * import com.pulumi.azurenative.blueprint.BlueprintArgs;
 * 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
 *             .blueprintName("simpleBlueprint")
 *             .description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
 *             .parameters(Map.ofEntries(
 *                 Map.entry("costCenter", Map.ofEntries(
 *                     Map.entry("displayName", "force cost center tag for all resources under given subscription."),
 *                     Map.entry("type", "string")
 *                 )),
 *                 Map.entry("owners", Map.ofEntries(
 *                     Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
 *                     Map.entry("type", "array")
 *                 )),
 *                 Map.entry("storageAccountType", Map.ofEntries(
 *                     Map.entry("displayName", "storage account type."),
 *                     Map.entry("type", "string")
 *                 ))
 *             ))
 *             .resourceGroups(Map.of("storageRG", Map.ofEntries(
 *                 Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
 *                 Map.entry("displayName", "storage resource group")
 *             )))
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .targetScope("subscription")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:blueprint:Blueprint simpleBlueprint /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName} * ``` * */ @ResourceType(type="azure-native:blueprint:Blueprint") public class Blueprint extends com.pulumi.resources.CustomResource { /** * 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); } /** * Layout view of the blueprint definition for UI reference. * */ @Export(name="layout", refs={Object.class}, tree="[0]") private Output layout; /** * @return Layout view of the blueprint definition for UI reference. * */ public Output layout() { return this.layout; } /** * 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; } /** * Parameters required by this blueprint definition. * */ @Export(name="parameters", refs={Map.class,String.class,ParameterDefinitionResponse.class}, tree="[0,1,2]") private Output> parameters; /** * @return Parameters required by this blueprint definition. * */ public Output>> parameters() { return Codegen.optional(this.parameters); } /** * Resource group placeholders defined by this blueprint definition. * */ @Export(name="resourceGroups", refs={Map.class,String.class,ResourceGroupDefinitionResponse.class}, tree="[0,1,2]") private Output> resourceGroups; /** * @return Resource group placeholders defined by this blueprint definition. * */ public Output>> resourceGroups() { return Codegen.optional(this.resourceGroups); } /** * Status of the blueprint. This field is readonly. * */ @Export(name="status", refs={BlueprintStatusResponse.class}, tree="[0]") private Output status; /** * @return Status of the blueprint. This field is readonly. * */ public Output status() { return this.status; } /** * The scope where this blueprint definition can be assigned. * */ @Export(name="targetScope", refs={String.class}, tree="[0]") private Output targetScope; /** * @return The scope where this blueprint definition can be assigned. * */ public Output targetScope() { return this.targetScope; } /** * 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; } /** * Published versions of this blueprint definition. * */ @Export(name="versions", refs={Object.class}, tree="[0]") private Output versions; /** * @return Published versions of this blueprint definition. * */ public Output> versions() { return Codegen.optional(this.versions); } /** * * @param name The _unique_ name of the resulting resource. */ public Blueprint(java.lang.String name) { this(name, BlueprintArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Blueprint(java.lang.String name, BlueprintArgs 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 Blueprint(java.lang.String name, BlueprintArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:Blueprint", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Blueprint(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:Blueprint", name, null, makeResourceOptions(options, id), false); } private static BlueprintArgs makeArgs(BlueprintArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? BlueprintArgs.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:Blueprint").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 Blueprint get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Blueprint(name, id, options); } }