Stack

class Stack : KotlinCustomResource

Provides a ROS Stack resource. For information about ROS Stack and how to use it, see What is Stack.

NOTE: Available since v1.106.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ros.Stack("example", {
stackName: "tf-testaccstack",
templateBody: ` {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
`,
stackPolicyBody: ` {
\x09"Statement": [{
\x09\x09"Action": "Update:Delete",
\x09\x09"Resource": "*",
\x09\x09"Effect": "Allow",
\x09\x09"Principal": "*"
\x09}]
}
`,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ros.Stack("example",
stack_name="tf-testaccstack",
template_body=""" {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
""",
stack_policy_body=""" {
\x09"Statement": [{
\x09\x09"Action": "Update:Delete",
\x09\x09"Resource": "*",
\x09\x09"Effect": "Allow",
\x09\x09"Principal": "*"
\x09}]
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ros.Stack("example", new()
{
StackName = "tf-testaccstack",
TemplateBody = @" {
""ROSTemplateFormatVersion"": ""2015-09-01""
}
",
StackPolicyBody = @" {
""Statement"": [{
""Action"": ""Update:Delete"",
""Resource"": ""*"",
""Effect"": ""Allow"",
""Principal"": ""*""
}]
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ros.NewStack(ctx, "example", &ros.StackArgs{
StackName: pulumi.String("tf-testaccstack"),
TemplateBody: pulumi.String(" {\n \"ROSTemplateFormatVersion\": \"2015-09-01\"\n }\n"),
StackPolicyBody: pulumi.String(` {
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}
`),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ros.Stack;
import com.pulumi.alicloud.ros.StackArgs;
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 Stack("example", StackArgs.builder()
.stackName("tf-testaccstack")
.templateBody("""
{
"ROSTemplateFormatVersion": "2015-09-01"
}
""")
.stackPolicyBody("""
{
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}
""")
.build());
}
}
resources:
example:
type: alicloud:ros:Stack
properties:
stackName: tf-testaccstack
templateBody: |2
{
"ROSTemplateFormatVersion": "2015-09-01"
}
stackPolicyBody: |2
{
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}

Import

ROS Stack can be imported using the id, e.g.

$ pulumi import alicloud:ros/stack:Stack example <stack_id>

Properties

Link copied to clipboard
val createOption: Output<String>?

Specifies whether to delete the stack after it is created.

Link copied to clipboard

Specifies whether to enable deletion protection on the stack. Valid values: Disabled, Enabled. Default to: Disabled

Link copied to clipboard
val disableRollback: Output<Boolean>?

Specifies whether to disable rollback on stack creation failure. Default to: false.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The callback URL for receiving stack event N. Only HTTP POST is supported. Maximum value of N: 5.

Link copied to clipboard

The parameters. If the parameter name and value are not specified, ROS will use the default value specified in the template.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ramRoleName: Output<String>?

The name of the RAM role. ROS assumes the specified RAM role to create the stack and call API operations by using the credentials of the role.

Link copied to clipboard

Specifies whether to enable replacement update after a resource attribute that does not support modification update is changed. Modification update keeps the physical ID of the resource unchanged. However, the resource is deleted and then recreated, and its physical ID is changed if replacement update is enabled.

Link copied to clipboard

The retain all resources.

Link copied to clipboard
val retainResources: Output<List<String>>?

Specifies whether to retain the resources in the stack.

Link copied to clipboard
val stackName: Output<String>

The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.

Link copied to clipboard
val stackPolicyBody: Output<String>?

The structure that contains the stack policy body. The stack policy body must be 1 to 16,384 bytes in length.

Link copied to clipboard

The structure that contains the body of the temporary overriding stack policy. The stack policy body must be 1 to 16,384 bytes in length.

Link copied to clipboard

The URL of the file that contains the temporary overriding stack policy. The URL must point to a policy located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/stack-policy/demo and oss://ros/stack-policy/demo?RegionId=cn-hangzhou. The policy can be up to 16,384 bytes in length and the URL can be up to 1,350 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.

Link copied to clipboard
val stackPolicyUrl: Output<String>?

The URL of the file that contains the stack policy. The URL must point to a policy located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/stack-policy/demo and oss://ros/stack-policy/demo?RegionId=cn-hangzhou. The policy can be up to 16,384 bytes in length and the URL can be up to 1,350 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.

Link copied to clipboard
val status: Output<String>

The status of Stack.

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

A mapping of tags to assign to the resource.

Link copied to clipboard
val templateBody: Output<String>?

The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs.

Link copied to clipboard
val templateUrl: Output<String>?

The URL of the file that contains the template body. The URL must point to a template located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. The template must be 1 to 524,288 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.

Link copied to clipboard
val templateVersion: Output<String>?

The version of the template.

Link copied to clipboard
val timeoutInMinutes: Output<Int>?

The timeout period that is specified for the stack creation request. Default to: 60.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.