com.pulumi.azure.core.SubscriptionTemplateDeployment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.core;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.core.SubscriptionTemplateDeploymentArgs;
import com.pulumi.azure.core.inputs.SubscriptionTemplateDeploymentState;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Subscription Template Deployment.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.SubscriptionTemplateDeployment;
* import com.pulumi.azure.core.SubscriptionTemplateDeploymentArgs;
* 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 example = new SubscriptionTemplateDeployment("example", SubscriptionTemplateDeploymentArgs.builder()
* .name("example-deployment")
* .location("West Europe")
* .templateContent("""
* {
* "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
* "contentVersion": "1.0.0.0",
* "parameters": {},
* "variables": {},
* "resources": [
* {
* "type": "Microsoft.Resources/resourceGroups",
* "apiVersion": "2018-05-01",
* "location": "West Europe",
* "name": "some-resource-group",
* "properties": {}
* }
* ]
* }
* """)
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Subscription Template Deployments can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deployments/template1
* ```
*
*/
@ResourceType(type="azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment")
public class SubscriptionTemplateDeployment extends com.pulumi.resources.CustomResource {
/**
* The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
*
*/
@Export(name="debugLevel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> debugLevel;
/**
* @return The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
*
*/
public Output> debugLevel() {
return Codegen.optional(this.debugLevel);
}
/**
* The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.
*
*/
public Output location() {
return this.location;
}
/**
* The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The JSON Content of the Outputs of the ARM Template Deployment.
*
*/
@Export(name="outputContent", refs={String.class}, tree="[0]")
private Output outputContent;
/**
* @return The JSON Content of the Outputs of the ARM Template Deployment.
*
*/
public Output outputContent() {
return this.outputContent;
}
/**
* The contents of the ARM Template parameters file - containing a JSON list of parameters.
*
*/
@Export(name="parametersContent", refs={String.class}, tree="[0]")
private Output parametersContent;
/**
* @return The contents of the ARM Template parameters file - containing a JSON list of parameters.
*
*/
public Output parametersContent() {
return this.parametersContent;
}
/**
* A mapping of tags which should be assigned to the Subscription Template Deployment.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to the Subscription Template Deployment.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The contents of the ARM Template which should be deployed into this Subscription.
*
*/
@Export(name="templateContent", refs={String.class}, tree="[0]")
private Output templateContent;
/**
* @return The contents of the ARM Template which should be deployed into this Subscription.
*
*/
public Output templateContent() {
return this.templateContent;
}
/**
* The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `template_content`.
*
*/
@Export(name="templateSpecVersionId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> templateSpecVersionId;
/**
* @return The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `template_content`.
*
*/
public Output> templateSpecVersionId() {
return Codegen.optional(this.templateSpecVersionId);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SubscriptionTemplateDeployment(java.lang.String name) {
this(name, SubscriptionTemplateDeploymentArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SubscriptionTemplateDeployment(java.lang.String name, @Nullable SubscriptionTemplateDeploymentArgs 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 SubscriptionTemplateDeployment(java.lang.String name, @Nullable SubscriptionTemplateDeploymentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SubscriptionTemplateDeployment(java.lang.String name, Output id, @Nullable SubscriptionTemplateDeploymentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment", name, state, makeResourceOptions(options, id), false);
}
private static SubscriptionTemplateDeploymentArgs makeArgs(@Nullable SubscriptionTemplateDeploymentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SubscriptionTemplateDeploymentArgs.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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static SubscriptionTemplateDeployment get(java.lang.String name, Output id, @Nullable SubscriptionTemplateDeploymentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SubscriptionTemplateDeployment(name, id, state, options);
}
}