2015/05/07 - AWS CloudFormation - 17 new api methods
Returns descriptions of all resources of the specified stack.
For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.
Request Syntax
client.list_stack_resources( StackName='string', NextToken='string' )
string
[REQUIRED]
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
string
String that identifies the start of the next list of stack resource summaries, if there is one.
Default: There is no default value.
dict
Response Syntax
{ 'StackResourceSummaries': [ { 'LogicalResourceId': 'string', 'PhysicalResourceId': 'string', 'ResourceType': 'string', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE', 'ResourceStatusReason': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The output for a ListStackResources action.
StackResourceSummaries (list) --
A list of StackResourceSummary structures.
(dict) --
Contains high-level information about the specified stack resource.
LogicalResourceId (string) --
The logical name of the resource specified in the template.
PhysicalResourceId (string) --
The name or unique identifier that corresponds to a physical instance ID of the resource.
ResourceType (string) --
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
LastUpdatedTimestamp (datetime) --
Time the status was updated.
ResourceStatus (string) --
Current status of the resource.
ResourceStatusReason (string) --
Success/failure message associated with the resource.
NextToken (string) --
String that identifies the start of the next list of stack resources, if there is one.
Returns a description of the specified resource in the specified stack.
For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted.
Request Syntax
client.describe_stack_resource( StackName='string', LogicalResourceId='string' )
string
[REQUIRED]
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
string
[REQUIRED]
The logical name of the resource as specified in the template.
Default: There is no default value.
dict
Response Syntax
{ 'StackResourceDetail': { 'StackName': 'string', 'StackId': 'string', 'LogicalResourceId': 'string', 'PhysicalResourceId': 'string', 'ResourceType': 'string', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE', 'ResourceStatusReason': 'string', 'Description': 'string', 'Metadata': 'string' } }
Response Structure
(dict) --
The output for a DescribeStackResource action.
StackResourceDetail (dict) --
A StackResourceDetail structure containing the description of the specified resource in the specified stack.
StackName (string) --
The name associated with the stack.
StackId (string) --
Unique identifier of the stack.
LogicalResourceId (string) --
The logical name of the resource specified in the template.
PhysicalResourceId (string) --
The name or unique identifier that corresponds to a physical instance ID of a resource supported by AWS CloudFormation.
ResourceType (string) --
Type of resource. ((For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
LastUpdatedTimestamp (datetime) --
Time the status was updated.
ResourceStatus (string) --
Current status of the resource.
ResourceStatusReason (string) --
Success/failure message associated with the resource.
Description (string) --
User defined description associated with the resource.
Metadata (string) --
The JSON format content of the Metadata attribute declared for the resource. For more information, see Metadata Attribute in the AWS CloudFormation User Guide.
Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not show up in the DescribeStacks API if the deletion has been completed successfully.
Request Syntax
client.delete_stack( StackName='string' )
string
[REQUIRED]
The name or the unique identifier associated with the stack.
None
Returns information about a new or existing template. The GetTemplateSummary action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack.
You can use the GetTemplateSummary action when you submit a template, or you can get template information for a running or deleted stack.
For deleted stacks, GetTemplateSummary returns the template information for up to 90 days after the stack has been deleted. If the template does not exist, a ValidationError is returned.
Request Syntax
client.get_template_summary( TemplateBody='string', TemplateURL='string', StackName='string' )
string
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information about templates, see Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.
string
Location of file containing the template body. The URL must point to a template (max size: 307,200 bytes) located in an Amazon S3 bucket. For more information about templates, see Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.
string
The name or the unique identifier associated with the stack, which are not always interchangeable. For running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the unique stack ID.
Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.
dict
Response Syntax
{ 'Parameters': [ { 'ParameterKey': 'string', 'DefaultValue': 'string', 'ParameterType': 'string', 'NoEcho': True|False, 'Description': 'string' }, ], 'Description': 'string', 'Capabilities': [ 'CAPABILITY_IAM', ], 'CapabilitiesReason': 'string', 'Version': 'string' }
Response Structure
(dict) --
The output for the GetTemplateSummary action.
Parameters (list) --
A list of parameter declarations that describe various properties for each parameter.
(dict) --
The ParameterDeclaration data type.
ParameterKey (string) --
The name that is associated with the parameter.
DefaultValue (string) --
The default value of the parameter.
ParameterType (string) --
The type of parameter.
NoEcho (boolean) --
Flag that indicates whether the parameter value is shown as plain text in logs and in the AWS Management Console.
Description (string) --
The description that is associate with the parameter.
Description (string) --
The value that is defined in the Description property of the template.
Capabilities (list) --
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
(string) --
CapabilitiesReason (string) --
The capabilities reason found within the template.
Version (string) --
The AWS template format version, which identifies the capabilities of the template.
Returns the template body for a specified stack. You can get the template for running or deleted stacks.
For deleted stacks, GetTemplate returns the template for up to 90 days after the stack has been deleted.
Request Syntax
client.get_template( StackName='string' )
string
[REQUIRED]
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
dict
Response Syntax
{ 'TemplateBody': 'string' }
Response Structure
(dict) --
The output for GetTemplate action.
TemplateBody (string) --
Structure containing the template body. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.
Request Syntax
client.create_stack( StackName='string', TemplateBody='string', TemplateURL='string', Parameters=[ { 'ParameterKey': 'string', 'ParameterValue': 'string', 'UsePreviousValue': True|False }, ], DisableRollback=True|False, TimeoutInMinutes=123, NotificationARNs=[ 'string', ], Capabilities=[ 'CAPABILITY_IAM', ], OnFailure='DO_NOTHING'|'ROLLBACK'|'DELETE', StackPolicyBody='string', StackPolicyURL='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name associated with the stack. The name must be unique within your AWS account.
string
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
string
Location of file containing the template body. The URL must point to a template (max size: 307,200 bytes) located in an S3 bucket in the same region as the stack. For more information, go to the Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
list
A list of Parameter structures that specify input parameters for the stack.
(dict) --
The Parameter data type.
ParameterKey (string) --
The key associated with the parameter.
ParameterValue (string) --
The value associated with the parameter.
UsePreviousValue (boolean) --
During a stack update, use the existing parameter value that is being used for the stack.
boolean
Set to true to disable rollback of the stack if stack creation failed. You can specify either DisableRollback or OnFailure, but not both.
Default: false
integer
The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.
list
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
(string) --
list
A list of capabilities that you must specify before AWS CloudFormation can create or update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
Currently, the only valid value is CAPABILITY_IAM, which is required for the following resources: AWS::CloudFormation::Stack, AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains these resources, we recommend that you review any permissions associated with them. If you don't specify this parameter, this action returns an InsufficientCapabilities error.
(string) --
string
Determines what action will be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure or DisableRollback, but not both.
Default: ROLLBACK
string
Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
string
Location of a file containing the stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
list
A set of user-defined Tags to associate with this stack, represented by key/value pairs. Tags defined for the stack are propagated to EC2 resources that are created as part of the stack. A maximum number of 10 tags can be specified.
(dict) --
The Tag type is used by CreateStack in the Tags parameter. It allows you to specify a key/value pair that can be used to store information related to cost allocation for an AWS CloudFormation stack.
Key (string) --
Required. A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws:.
Value (string) --
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
dict
Response Syntax
{ 'StackId': 'string' }
Response Structure
(dict) --
The output for a CreateStack action.
StackId (string) --
Unique identifier of the stack.
Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.
To get a copy of the template for an existing stack, you can use the GetTemplate action.
Tags that were associated with this stack during creation time will still be associated with the stack after an UpdateStack operation.
For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack.
Request Syntax
client.update_stack( StackName='string', TemplateBody='string', TemplateURL='string', UsePreviousTemplate=True|False, StackPolicyDuringUpdateBody='string', StackPolicyDuringUpdateURL='string', Parameters=[ { 'ParameterKey': 'string', 'ParameterValue': 'string', 'UsePreviousValue': True|False }, ], Capabilities=[ 'CAPABILITY_IAM', ], StackPolicyBody='string', StackPolicyURL='string', NotificationARNs=[ 'string', ] )
string
[REQUIRED]
The name or stack ID of the stack to update.
string
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
string
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
boolean
Reuse the existing template that is associated with the stack that you are updating.
string
Structure containing the temporary overriding stack policy body. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
string
Location of a file containing the temporary overriding stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
list
A list of Parameter structures that specify input parameters for the stack.
(dict) --
The Parameter data type.
ParameterKey (string) --
The key associated with the parameter.
ParameterValue (string) --
The value associated with the parameter.
UsePreviousValue (boolean) --
During a stack update, use the existing parameter value that is being used for the stack.
list
A list of capabilities that you must specify before AWS CloudFormation can create or update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter. Currently, the only valid value is CAPABILITY_IAM, which is required for the following resources: AWS::CloudFormation::Stack, AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains these resources, we recommend that you review any permissions associated with them. If you don't specify this parameter, this action returns an InsufficientCapabilities error.
(string) --
string
Structure containing a new stack policy body. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
string
Location of a file containing the updated stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
list
Update the ARNs for the Amazon SNS topics that are associated with the stack.
(string) --
dict
Response Syntax
{ 'StackId': 'string' }
Response Structure
(dict) --
The output for a UpdateStack action.
StackId (string) --
Unique identifier of the stack.
Returns AWS resource descriptions for running and deleted stacks. If StackName is specified, all the associated resources that are part of the stack are returned. If PhysicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned.
For deleted stacks, DescribeStackResources returns resource information for up to 90 days after the stack has been deleted.
You must specify either StackName or PhysicalResourceId, but not both. In addition, you can specify LogicalResourceId to filter the returned result. For more information about resources, the LogicalResourceId and PhysicalResourceId, go to the AWS CloudFormation User Guide.
Request Syntax
client.describe_stack_resources( StackName='string', LogicalResourceId='string', PhysicalResourceId='string' )
string
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
Required: Conditional. If you do not specify StackName, you must specify PhysicalResourceId.
string
The logical name of the resource as specified in the template.
Default: There is no default value.
string
The name or unique identifier that corresponds to a physical instance ID of a resource supported by AWS CloudFormation.
For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources to find which stack the instance belongs to and what other resources are part of the stack.
Required: Conditional. If you do not specify PhysicalResourceId, you must specify StackName.
Default: There is no default value.
dict
Response Syntax
{ 'StackResources': [ { 'StackName': 'string', 'StackId': 'string', 'LogicalResourceId': 'string', 'PhysicalResourceId': 'string', 'ResourceType': 'string', 'Timestamp': datetime(2015, 1, 1), 'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE', 'ResourceStatusReason': 'string', 'Description': 'string' }, ] }
Response Structure
(dict) --
The output for a DescribeStackResources action.
StackResources (list) --
A list of StackResource structures.
(dict) --
The StackResource data type.
StackName (string) --
The name associated with the stack.
StackId (string) --
Unique identifier of the stack.
LogicalResourceId (string) --
The logical name of the resource specified in the template.
PhysicalResourceId (string) --
The name or unique identifier that corresponds to a physical instance ID of a resource supported by AWS CloudFormation.
ResourceType (string) --
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
Timestamp (datetime) --
Time the status was updated.
ResourceStatus (string) --
Current status of the resource.
ResourceStatusReason (string) --
Success/failure message associated with the resource.
Description (string) --
User defined description associated with the resource.
Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.
Request Syntax
client.describe_stacks( StackName='string', NextToken='string' )
string
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
string
String that identifies the start of the next list of stacks, if there is one.
dict
Response Syntax
{ 'Stacks': [ { 'StackId': 'string', 'StackName': 'string', 'Description': 'string', 'Parameters': [ { 'ParameterKey': 'string', 'ParameterValue': 'string', 'UsePreviousValue': True|False }, ], 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'StackStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_FAILED'|'ROLLBACK_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_FAILED'|'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE', 'StackStatusReason': 'string', 'DisableRollback': True|False, 'NotificationARNs': [ 'string', ], 'TimeoutInMinutes': 123, 'Capabilities': [ 'CAPABILITY_IAM', ], 'Outputs': [ { 'OutputKey': 'string', 'OutputValue': 'string', 'Description': 'string' }, ], 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The output for a DescribeStacks action.
Stacks (list) --
A list of stack structures.
(dict) --
The Stack data type.
StackId (string) --
Unique identifier of the stack.
StackName (string) --
The name associated with the stack.
Description (string) --
User defined description associated with the stack.
Parameters (list) --
A list of Parameter structures.
(dict) --
The Parameter data type.
ParameterKey (string) --
The key associated with the parameter.
ParameterValue (string) --
The value associated with the parameter.
UsePreviousValue (boolean) --
During a stack update, use the existing parameter value that is being used for the stack.
CreationTime (datetime) --
Time at which the stack was created.
LastUpdatedTime (datetime) --
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
StackStatus (string) --
Current status of the stack.
StackStatusReason (string) --
Success/failure message associated with the stack status.
DisableRollback (boolean) --
Boolean to enable or disable rollback on stack creation failures:
true: disable rollback
false: enable rollback
NotificationARNs (list) --
SNS topic ARNs to which stack related events are published.
(string) --
TimeoutInMinutes (integer) --
The amount of time within which stack creation should complete.
Capabilities (list) --
The capabilities allowed in the stack.
(string) --
Outputs (list) --
A list of output structures.
(dict) --
The Output data type.
OutputKey (string) --
The key associated with the output.
OutputValue (string) --
The value associated with the output.
Description (string) --
User defined description associated with the output.
Tags (list) --
A list of ``Tag``s that specify cost allocation information for the stack.
(dict) --
The Tag type is used by CreateStack in the Tags parameter. It allows you to specify a key/value pair that can be used to store information related to cost allocation for an AWS CloudFormation stack.
Key (string) --
Required. A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws:.
Value (string) --
Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
NextToken (string) -- String that identifies the start of the next list of stacks, if there is one.
Sends a signal to the specified resource with a success or failure status. You can use the SignalResource API in conjunction with a creation policy or update policy. AWS CloudFormation doesn't proceed with a stack creation or update until resources receive the required number of signals or the timeout period is exceeded. The SignalResource API is useful in cases where you want to send signals from anywhere other than an Amazon EC2 instance.
Request Syntax
client.signal_resource( StackName='string', LogicalResourceId='string', UniqueId='string', Status='SUCCESS'|'FAILURE' )
string
[REQUIRED]
The stack name or ID that includes the resource that you want to signal.
string
[REQUIRED]
The logical ID of the resource that you want to signal. The logical ID is the name of the resource that given in the template.
string
[REQUIRED]
A unique ID of the signal. When you signal Amazon EC2 instances or Auto Scaling groups, specify the instance ID that you are signaling as the unique ID. If you send multiple signals to a single resource (such as signaling a wait condition), each signal requires a different unique ID.
string
[REQUIRED]
The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
None
Cancels an update on the specified stack. If the call completes successfully, the stack will roll back the update and revert to the previous stack configuration.
Request Syntax
client.cancel_update_stack( StackName='string' )
string
[REQUIRED]
The name or the unique identifier associated with the stack.
None
Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
Request Syntax
client.get_stack_policy( StackName='string' )
string
[REQUIRED]
The name or stack ID that is associated with the stack whose policy you want to get.
dict
Response Syntax
{ 'StackPolicyBody': 'string' }
Response Structure
(dict) --
The output for the GetStackPolicy action.
StackPolicyBody (string) --
Structure containing the stack policy body. (For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide.)
Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).
Request Syntax
client.list_stacks( NextToken='string', StackStatusFilter=[ 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_FAILED'|'ROLLBACK_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_FAILED'|'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE', ] )
string
String that identifies the start of the next list of stacks, if there is one.
Default: There is no default value.
list
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
(string) --
dict
Response Syntax
{ 'StackSummaries': [ { 'StackId': 'string', 'StackName': 'string', 'TemplateDescription': 'string', 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'DeletionTime': datetime(2015, 1, 1), 'StackStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_FAILED'|'ROLLBACK_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_FAILED'|'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE', 'StackStatusReason': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The output for ListStacks action.
StackSummaries (list) --
A list of StackSummary structures containing information about the specified stacks.
(dict) --
The StackSummary Data Type
StackId (string) --
Unique stack identifier.
StackName (string) --
The name associated with the stack.
TemplateDescription (string) --
The template description of the template used to create the stack.
CreationTime (datetime) --
The time the stack was created.
LastUpdatedTime (datetime) --
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
DeletionTime (datetime) --
The time the stack was deleted.
StackStatus (string) --
The current status of the stack.
StackStatusReason (string) --
Success/Failure message associated with the stack status.
NextToken (string) --
String that identifies the start of the next list of stacks, if there is one.
Returns all stack related events for a specified stack. For more information about a stack's event history, go to Stacks in the AWS CloudFormation User Guide.
Request Syntax
client.describe_stack_events( StackName='string', NextToken='string' )
string
The name or the unique identifier associated with the stack, which are not always interchangeable:
Running stacks: You can specify either the stack's name or its unique stack ID.
Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.
string
String that identifies the start of the next list of events, if there is one.
Default: There is no default value.
dict
Response Syntax
{ 'StackEvents': [ { 'StackId': 'string', 'EventId': 'string', 'StackName': 'string', 'LogicalResourceId': 'string', 'PhysicalResourceId': 'string', 'ResourceType': 'string', 'Timestamp': datetime(2015, 1, 1), 'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE', 'ResourceStatusReason': 'string', 'ResourceProperties': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The output for a DescribeStackEvents action.
StackEvents (list) --
A list of StackEvents structures.
(dict) --
The StackEvent data type.
StackId (string) --
The unique ID name of the instance of the stack.
EventId (string) --
The unique ID of this event.
StackName (string) --
The name associated with a stack.
LogicalResourceId (string) --
The logical name of the resource specified in the template.
PhysicalResourceId (string) --
The name or unique identifier associated with the physical instance of the resource.
ResourceType (string) --
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
Timestamp (datetime) --
Time the status was updated.
ResourceStatus (string) --
Current status of the resource.
ResourceStatusReason (string) --
Success/failure message associated with the resource.
ResourceProperties (string) --
BLOB of the properties used to create the resource.
NextToken (string) --
String that identifies the start of the next list of events, if there is one.
Returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
Request Syntax
client.estimate_template_cost( TemplateBody='string', TemplateURL='string', Parameters=[ { 'ParameterKey': 'string', 'ParameterValue': 'string', 'UsePreviousValue': True|False }, ] )
string
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.
string
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
list
A list of Parameter structures that specify input parameters.
(dict) --
The Parameter data type.
ParameterKey (string) --
The key associated with the parameter.
ParameterValue (string) --
The value associated with the parameter.
UsePreviousValue (boolean) --
During a stack update, use the existing parameter value that is being used for the stack.
dict
Response Syntax
{ 'Url': 'string' }
Response Structure
(dict) --
The output for a EstimateTemplateCost action.
Url (string) --
An AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
Sets a stack policy for a specified stack.
Request Syntax
client.set_stack_policy( StackName='string', StackPolicyBody='string', StackPolicyURL='string' )
string
[REQUIRED]
The name or stack ID that you want to associate a policy with.
string
Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
string
Location of a file containing the stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
None
Validates a specified template.
Request Syntax
client.validate_template( TemplateBody='string', TemplateURL='string' )
string
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
string
Location of file containing the template body. The URL must point to a template (max size: 307,200 bytes) located in an S3 bucket in the same region as the stack. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
dict
Response Syntax
{ 'Parameters': [ { 'ParameterKey': 'string', 'DefaultValue': 'string', 'NoEcho': True|False, 'Description': 'string' }, ], 'Description': 'string', 'Capabilities': [ 'CAPABILITY_IAM', ], 'CapabilitiesReason': 'string' }
Response Structure
(dict) --
The output for ValidateTemplate action.
Parameters (list) --
A list of TemplateParameter structures.
(dict) --
The TemplateParameter data type.
ParameterKey (string) --
The name associated with the parameter.
DefaultValue (string) --
The default value associated with the parameter.
NoEcho (boolean) --
Flag indicating whether the parameter should be displayed as plain text in logs and UIs.
Description (string) --
User defined description associated with the parameter.
Description (string) --
The description found within the template.
Capabilities (list) --
The capabilities found within the template. Currently, AWS CloudFormation supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
(string) --
CapabilitiesReason (string) --
The capabilities reason found within the template.