Show / Hide Table of Contents

Class Stack

Provides a CloudFormation Stack resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var network = new Aws.CloudFormation.Stack("network", new Aws.CloudFormation.StackArgs
    {
        Parameters = 
        {
            { "VPCCidr", "10.0.0.0/16" },
        },
        TemplateBody = @"{
""Parameters"" : {
""VPCCidr"" : {
  ""Type"" : ""String"",
  ""Default"" : ""10.0.0.0/16"",
  ""Description"" : ""Enter the CIDR block for the VPC. Default is 10.0.0.0/16.""
}
},
""Resources"" : {
""myVpc"": {
  ""Type"" : ""AWS::EC2::VPC"",
  ""Properties"" : {
    ""CidrBlock"" : { ""Ref"" : ""VPCCidr"" },
    ""Tags"" : [
      {""Key"": ""Name"", ""Value"": ""Primary_CF_VPC""}
    ]
  }
}
}
}

",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Stack
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.CloudFormation
Assembly: Pulumi.Aws.dll
Syntax
public class Stack : CustomResource

Constructors

View Source

Stack(String, StackArgs, CustomResourceOptions)

Create a Stack resource with the given unique name, arguments, and options.

Declaration
public Stack(string name, StackArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

StackArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Capabilities

A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND

Declaration
public Output<ImmutableArray<string>> Capabilities { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

DisableRollback

Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.

Declaration
public Output<bool?> DisableRollback { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

IamRoleArn

The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.

Declaration
public Output<string> IamRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Stack name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NotificationArns

A list of SNS topic ARNs to publish stack related events.

Declaration
public Output<ImmutableArray<string>> NotificationArns { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

OnFailure

Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.

Declaration
public Output<string> OnFailure { get; }
Property Value
Type Description
Output<System.String>
View Source

Outputs

A map of outputs from the stack.

Declaration
public Output<ImmutableDictionary<string, object>> Outputs { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Parameters

A map of Parameter structures that specify input parameters for the stack.

Declaration
public Output<ImmutableDictionary<string, object>> Parameters { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

PolicyBody

Structure containing the stack policy body. Conflicts w/ policy_url.

Declaration
public Output<string> PolicyBody { get; }
Property Value
Type Description
Output<System.String>
View Source

PolicyUrl

Location of a file containing the stack policy. Conflicts w/ policy_body.

Declaration
public Output<string> PolicyUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A list of tags to associate with this stack.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TemplateBody

Structure containing the template body (max size: 51,200 bytes).

Declaration
public Output<string> TemplateBody { get; }
Property Value
Type Description
Output<System.String>
View Source

TemplateUrl

Location of a file containing the template body (max size: 460,800 bytes).

Declaration
public Output<string> TemplateUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

TimeoutInMinutes

The amount of time that can pass before the stack status becomes CREATE_FAILED.

Declaration
public Output<int?> TimeoutInMinutes { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>

Methods

View Source

Get(String, Input<String>, StackState, CustomResourceOptions)

Get an existing Stack resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Stack Get(string name, Input<string> id, StackState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

StackState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Stack
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.