com.pulumi.alicloud.oos.kotlin.TemplateArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.oos.kotlin
import com.pulumi.alicloud.oos.TemplateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a OOS Template resource. For information about Alicloud OOS Template and how to use it, see [What is Resource Alicloud OOS Template](https://www.alibabacloud.com/help/doc-detail/120761.htm).
* > **NOTE:** Available in 1.92.0+.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* const example = new alicloud.oos.Template("example", {
* 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"
* }]
* }
* `,
* templateName: "test-name",
* versionName: "test",
* tags: {
* Created: "TF",
* For: "acceptance Test",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* example = alicloud.oos.Template("example",
* 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"
* }]
* }
* """,
* template_name="test-name",
* version_name="test",
* tags={
* "Created": "TF",
* "For": "acceptance Test",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* return await Deployment.RunAsync(() =>
* {
* var example = new AliCloud.Oos.Template("example", new()
* {
* 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""
* }]
* }
* ",
* TemplateName = "test-name",
* VersionName = "test",
* Tags =
* {
* { "Created", "TF" },
* { "For", "acceptance Test" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := oos.NewTemplate(ctx, "example", &oos.TemplateArgs{
* Content: pulumi.String(` {
* "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"
* }]
* }
* `),
* TemplateName: pulumi.String("test-name"),
* VersionName: pulumi.String("test"),
* Tags: pulumi.StringMap{
* "Created": pulumi.String("TF"),
* "For": pulumi.String("acceptance Test"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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"
* }]
* }
* """)
* .templateName("test-name")
* .versionName("test")
* .tags(Map.ofEntries(
* Map.entry("Created", "TF"),
* Map.entry("For", "acceptance Test")
* ))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: alicloud:oos:Template
* properties:
* content: |2
* {
* "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"
* }]
* }
* templateName: test-name
* versionName: test
* tags:
* Created: TF
* For: acceptance Test
* ```
*
* ## Import
* OOS Template can be imported using the id or template_name, e.g.
* ```sh
* $ pulumi import alicloud:oos/template:Template example template_name
* ```
* @property autoDeleteExecutions When deleting a template, whether to delete its related executions. Default to `false`.
* @property content The content of the template. The template must be in the JSON or YAML format. Maximum size: 64 KB.
* @property resourceGroupId The ID of resource group which the template belongs.
* @property tags A mapping of tags to assign to the resource.
* @property templateName 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`.
* @property versionName The name of template version.
*/
public data class TemplateArgs(
public val autoDeleteExecutions: Output? = null,
public val content: Output? = null,
public val resourceGroupId: Output? = null,
public val tags: Output