Skip to content
v2.277.0

AwsCloudFormationStackProperties Struct ​

Artifact properties for CloudFormation stacks.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
const awsCloudFormationStackProperties: cx_api.AwsCloudFormationStackProperties = {
  templateFile: 'templateFile',

  // the properties below are optional
  parameters: {
    parametersKey: 'parameters',
  },
  stackName: 'stackName',
  terminationProtection: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cx_api

aws_cloud_formation_stack_properties = cx_api.AwsCloudFormationStackProperties(
    template_file="templateFile",

    # the properties below are optional
    parameters={
        "parameters_key": "parameters"
    },
    stack_name="stackName",
    termination_protection=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cxapi.*;

AwsCloudFormationStackProperties awsCloudFormationStackProperties = AwsCloudFormationStackProperties.builder()
        .templateFile("templateFile")

        // the properties below are optional
        .parameters(Map.of(
                "parametersKey", "parameters"))
        .stackName("stackName")
        .terminationProtection(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CXAPI;

var awsCloudFormationStackProperties = new AwsCloudFormationStackProperties {
    TemplateFile = "templateFile",

    // the properties below are optional
    Parameters = new Dictionary<string, string> {
        { "parametersKey", "parameters" }
    },
    StackName = "stackName",
    TerminationProtection = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

awsCloudFormationStackProperties := &AwsCloudFormationStackProperties{
	TemplateFile: jsii.String("templateFile"),

	// the properties below are optional
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	StackName: jsii.String("stackName"),
	TerminationProtection: jsii.Boolean(false),
}

Properties ​

parametersoptional{ [key: string]: string }parametersoptionaltyping.Mapping[str, str]parametersoptionalMap<String, String>ParametersoptionalIDictionary<string, string>Parametersoptional*map[string]*string#
Values for CloudFormation stack parameters that should be passed when the stack is deployed.
stackNameoptionalstringstack_nameoptionalstrstackNameoptionalStringStackNameoptionalstringStackNameoptional*string#
The name to use for the CloudFormation stack.

Default: name derived from artifact ID

templateFilestringtemplate_filestrtemplateFileStringTemplateFilestringTemplateFile*stringrequired#
A file relative to the assembly root which contains the CloudFormation template for this stack.
terminationProtectionoptionalbooleantermination_protectionoptionalboolterminationProtectionoptionalBooleanTerminationProtectionoptionalboolTerminationProtectionoptional*bool= false#
Whether to enable termination protection for this stack.