TemplateArgs

data class TemplateArgs(val autoDeleteExecutions: Output<Boolean>? = null, val content: Output<String>? = null, val resourceGroupId: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val templateName: Output<String>? = null, val versionName: Output<String>? = null) : ConvertibleToJava<TemplateArgs>

Provides a OOS Template resource. For information about Alicloud OOS Template and how to use it, see What is Resource Alicloud OOS Template.

NOTE: Available in 1.92.0+.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oos.Template;
import com.pulumi.alicloud.oos.TemplateArgs;
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 Template("example", TemplateArgs.builder()
.content("""
{
"FormatVersion": "OOS-2019-06-01",
"Description": "Update Describe instances of given status",
"Parameters":{
"Status":{
"Type": "String",
"Description": "(Required) The status of the Ecs instance."
}
},
"Tasks": [
{
"Properties" :{
"Parameters":{
"Status": "{{ Status }}"
},
"API": "DescribeInstances",
"Service": "Ecs"
},
"Name": "foo",
"Action": "ACS::ExecuteApi"
}]
}
""")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "acceptance Test")
))
.templateName("test-name")
.versionName("test")
.build());
}
}

Import

OOS Template can be imported using the id or template_name, e.g.

$ pulumi import alicloud:oos/template:Template example template_name

Constructors

Link copied to clipboard
fun TemplateArgs(autoDeleteExecutions: Output<Boolean>? = null, content: Output<String>? = null, resourceGroupId: Output<String>? = null, tags: Output<Map<String, Any>>? = null, templateName: Output<String>? = null, versionName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TemplateArgs

Properties

Link copied to clipboard
val autoDeleteExecutions: Output<Boolean>? = null

When deleting a template, whether to delete its related executions. Default to false.

Link copied to clipboard
val content: Output<String>? = null

The content of the template. The template must be in the JSON or YAML format. Maximum size: 64 KB.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of resource group which the template belongs.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val templateName: Output<String>? = null

The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, or ALICLOUD.

Link copied to clipboard
val versionName: Output<String>? = null

The name of template version.