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

com.pulumi.azurenative.blueprint.TemplateArtifact 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.TemplateArtifactArgs;
import com.pulumi.azurenative.blueprint.outputs.ParameterValueResponse;
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;

/**
 * Blueprint artifact that deploys a Resource Manager template.
 * Azure REST API version: 2018-11-01-preview. Prior API version in Azure Native 1.x: 2018-11-01-preview.
 * 
 * ## Example Usage
 * ### MG-ARMTemplateArtifact
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("storageTemplate")
 *             .blueprintName("simpleBlueprint")
 *             .kind("template")
 *             .parameters(Map.of("storageAccountType", Map.of("value", "[parameters('storageAccountType')]")))
 *             .resourceGroup("storageRG")
 *             .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
 *             .template(Map.ofEntries(
 *                 Map.entry("contentVersion", "1.0.0.0"),
 *                 Map.entry("outputs", Map.of("storageAccountName", Map.ofEntries(
 *                     Map.entry("type", "string"),
 *                     Map.entry("value", "[variables('storageAccountName')]")
 *                 ))),
 *                 Map.entry("parameters", Map.of("storageAccountType", Map.ofEntries(
 *                     Map.entry("allowedValues",                     
 *                         "Standard_LRS",
 *                         "Standard_GRS",
 *                         "Standard_ZRS",
 *                         "Premium_LRS"),
 *                     Map.entry("defaultValue", "Standard_LRS"),
 *                     Map.entry("metadata", Map.of("description", "Storage Account type")),
 *                     Map.entry("type", "string")
 *                 ))),
 *                 Map.entry("resources", Map.ofEntries(
 *                     Map.entry("apiVersion", "2016-01-01"),
 *                     Map.entry("kind", "Storage"),
 *                     Map.entry("location", "[resourceGroup().location]"),
 *                     Map.entry("name", "[variables('storageAccountName')]"),
 *                     Map.entry("properties", ),
 *                     Map.entry("sku", Map.of("name", "[parameters('storageAccountType')]")),
 *                     Map.entry("type", "Microsoft.Storage/storageAccounts")
 *                 )),
 *                 Map.entry("variables", Map.of("storageAccountName", "[concat(uniquestring(resourceGroup().id), 'standardsa')]"))
 *             ))
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### MG-PolicyAssignmentArtifact * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("costCenterPolicy")
 *             .blueprintName("simpleBlueprint")
 *             .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### MG-RoleAssignmentArtifact * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("ownerAssignment")
 *             .blueprintName("simpleBlueprint")
 *             .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Sub-ARMTemplateArtifact * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("storageTemplate")
 *             .blueprintName("simpleBlueprint")
 *             .kind("template")
 *             .parameters(Map.of("storageAccountType", Map.of("value", "[parameters('storageAccountType')]")))
 *             .resourceGroup("storageRG")
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .template(Map.ofEntries(
 *                 Map.entry("contentVersion", "1.0.0.0"),
 *                 Map.entry("outputs", Map.of("storageAccountName", Map.ofEntries(
 *                     Map.entry("type", "string"),
 *                     Map.entry("value", "[variables('storageAccountName')]")
 *                 ))),
 *                 Map.entry("parameters", Map.of("storageAccountType", Map.ofEntries(
 *                     Map.entry("allowedValues",                     
 *                         "Standard_LRS",
 *                         "Standard_GRS",
 *                         "Standard_ZRS",
 *                         "Premium_LRS"),
 *                     Map.entry("defaultValue", "Standard_LRS"),
 *                     Map.entry("metadata", Map.of("description", "Storage Account type")),
 *                     Map.entry("type", "string")
 *                 ))),
 *                 Map.entry("resources", Map.ofEntries(
 *                     Map.entry("apiVersion", "2016-01-01"),
 *                     Map.entry("kind", "Storage"),
 *                     Map.entry("location", "[resourceGroup().location]"),
 *                     Map.entry("name", "[variables('storageAccountName')]"),
 *                     Map.entry("properties", ),
 *                     Map.entry("sku", Map.of("name", "[parameters('storageAccountType')]")),
 *                     Map.entry("type", "Microsoft.Storage/storageAccounts")
 *                 )),
 *                 Map.entry("variables", Map.of("storageAccountName", "[concat(uniquestring(resourceGroup().id), 'standardsa')]"))
 *             ))
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Sub-PolicyAssignmentArtifact * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("costCenterPolicy")
 *             .blueprintName("simpleBlueprint")
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Sub-RoleAssignmentArtifact * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.blueprint.TemplateArtifact;
 * import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
 * 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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
 *             .artifactName("ownerAssignment")
 *             .blueprintName("simpleBlueprint")
 *             .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:TemplateArtifact ownerAssignment /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName} * ``` * */ @ResourceType(type="azure-native:blueprint:TemplateArtifact") public class TemplateArtifact extends com.pulumi.resources.CustomResource { /** * Artifacts which need to be deployed before the specified artifact. * */ @Export(name="dependsOn", refs={List.class,String.class}, tree="[0,1]") private Output> dependsOn; /** * @return Artifacts which need to be deployed before the specified artifact. * */ public Output>> dependsOn() { return Codegen.optional(this.dependsOn); } /** * 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); } /** * Specifies the kind of blueprint artifact. * Expected value is 'template'. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Specifies the kind of blueprint artifact. * Expected value is 'template'. * */ public Output kind() { return this.kind; } /** * 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; } /** * Resource Manager template blueprint artifact parameter values. * */ @Export(name="parameters", refs={Map.class,String.class,ParameterValueResponse.class}, tree="[0,1,2]") private Output> parameters; /** * @return Resource Manager template blueprint artifact parameter values. * */ public Output> parameters() { return this.parameters; } /** * If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed. * */ @Export(name="resourceGroup", refs={String.class}, tree="[0]") private Output resourceGroup; /** * @return If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed. * */ public Output> resourceGroup() { return Codegen.optional(this.resourceGroup); } /** * The Resource Manager template blueprint artifact body. * */ @Export(name="template", refs={Object.class}, tree="[0]") private Output template; /** * @return The Resource Manager template blueprint artifact body. * */ public Output template() { return this.template; } /** * 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 TemplateArtifact(java.lang.String name) { this(name, TemplateArtifactArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public TemplateArtifact(java.lang.String name, TemplateArtifactArgs 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 TemplateArtifact(java.lang.String name, TemplateArtifactArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:TemplateArtifact", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private TemplateArtifact(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:blueprint:TemplateArtifact", name, null, makeResourceOptions(options, id), false); } private static TemplateArtifactArgs makeArgs(TemplateArtifactArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } var builder = args == null ? TemplateArtifactArgs.builder() : TemplateArtifactArgs.builder(args); return builder .kind("template") .build(); } 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:TemplateArtifact").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 TemplateArtifact get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new TemplateArtifact(name, id, options); } }