The following example shows the response to DescribeTypeRegistration once CloudFormation has successfully completed registering the extension.
Sample Request
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20191203T233327Z
<DescribeTypeRegistrationResult>
<Description>Deployment is currently in DEPLOY_STAGE of status COMPLETED; </
Description>
<ProgressStatus>COMPLETE</ProgressStatus>
<TypeArn>arn:aws:cloudformation:us-east-1:012345678910:type/resource/My-Resource-Example</TypeArn>
<TypeVersionArn>arn:aws:cloudformation:us-east-1:012345678910:type/resource/My-Resource-Example/00000001</TypeVersionArn>
</DescribeTypeRegistrationResult>
<ResponseMetadata>
<RequestId>2d187120-6f6e-4d43-80f5-99b588example</RequestId>
</ResponseMetadata>
</DescribeTypeRegistrationResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DetectStackDrift
DetectStackDrift
Detects whether a stack's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters. For each resource in the stack that supports drift detection, AWS CloudFormation compares the actual configuration of the resource with its expected template configuration. Only resource properties explicitly defined in the stack template are checked for drift. A stack is considered to have drifted if one or more of its resources differ from their expected template configurations. For more information, see Detecting Unregulated Configuration Changes to Stacks and Resources.
Use DetectStackDrift to detect drift on all supported resources for a given stack, or DetectStackResourceDrift (p. 113) to detect drift on individual resources.
For a list of stack resources that currently support drift detection, see Resources that Support Drift Detection.
DetectStackDrift can take up to several minutes, depending on the number of resources contained within the stack. Use DescribeStackDriftDetectionStatus (p. 70) to monitor the progress of a detect stack drift operation. Once the drift detection operation has completed, use DescribeStackResourceDrifts (p. 81) to return drift information about the stack and its resources.
When detecting drift on a stack, AWS CloudFormation doesn't detect drift on any nested stacks belonging to that stack. Perform DetectStackDrift directly on the nested stack itself.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
LogicalResourceIds.member.N
The logical names of any resources you want to use as filters.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 200 items.
Required: No StackName
The name of the stack for which you want to detect drift.
Type: String
Length Constraints: Minimum length of 1.
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)
Required: Yes
Response Elements
The following element is returned by the service.
StackDriftDetectionId
The ID of the drift detection results of this operation.
Errors
AWS CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of drift results AWS CloudFormation retains for any given stack, and for how long, may vary.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 36.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
Examples
DetectStackDrift
This example illustrates one usage of DetectStackDrift.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=DetectStackDrift &Version=2010-05-15
&StackName=my-stack-with-resource-drift &X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20171211T230005Z
&X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]
Sample Response
<DetectStackDriftResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">
<DetectStackDriftResult>
<StackDriftDetectionId>2f2b2d60-df86-11e7-bea1-500c2example</StackDriftDetectionId>
</DetectStackDriftResult>
<ResponseMetadata>
<RequestId>2f07c75d-df86-11e7-8270-89489example</RequestId>
</ResponseMetadata>
</DetectStackDriftResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
See Also
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DetectStackResourceDrift
DetectStackResourceDrift
Returns information about whether a resource's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters. This information includes actual and expected property values for resources in which AWS CloudFormation detects drift. Only resource properties explicitly defined in the stack template are checked for drift. For more information about stack and resource drift, see Detecting Unregulated Configuration Changes to Stacks and Resources.
Use DetectStackResourceDrift to detect drift on individual resources, or DetectStackDrift (p. 110) to detect drift on all resources in a given stack that support drift detection.
Resources that don't currently support drift detection can't be checked. For a list of resources that support drift detection, see Resources that Support Drift Detection.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
LogicalResourceId
The logical name of the resource for which to return drift information.
Type: String Required: Yes StackName
The name of the stack to which the resource belongs.
Type: String
Length Constraints: Minimum length of 1.
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)
Required: Yes
Response Elements
The following element is returned by the service.
StackResourceDrift
Information about whether the resource's actual configuration has drifted from its expected
template configuration, including actual and expected property values and any differences detected.
Type: StackResourceDrift (p. 289) object
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
Examples
Examples
DetectStackResourceDrift
This example illustrates one usage of DetectStackResourceDrift.
Sample Request
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20171211T230005Z
<DetectStackResourceDriftResult>
<StackResourceDrift>
<PropertyDifferences>
<member>
<ActualValue>120</ActualValue>
<ExpectedValue>20</ExpectedValue>
<DifferenceType>NOT_EQUAL</DifferenceType>
<PropertyPath>/DelaySeconds</PropertyPath>
</member>
<member>
<ActualValue>12</ActualValue>
<ExpectedValue>10</ExpectedValue>
<DifferenceType>NOT_EQUAL</DifferenceType>
<PropertyPath>/RedrivePolicy/maxReceiveCount</PropertyPath>
</member>
</PropertyDifferences>
<PhysicalResourceId>https://sqs.us-east-1.amazonaws.com/012345678910/my-stack-with-resource-drift-Queue-494PBHCO76H4</PhysicalResourceId>
<ExpectedProperties>{
"ReceiveMessageWaitTimeSeconds":0, "DelaySeconds":20,
"RedrivePolicy":{
"deadLetterTargetArn":"arn:aws:sqs:us-east-1:012345678910:my-stack-with-resource-drift-DLQ-1BCY7HHD5QIM3",
"maxReceiveCount":10 },
"MessageRetentionPeriod":345600, "MaximumMessageSize":262144, "VisibilityTimeout":60,
"QueueName":"my-stack-with-resource-drift-Queue-494PBHCO76H4"
}
</ExpectedProperties>
<StackResourceDriftStatus>MODIFIED</StackResourceDriftStatus>
<StackId>arn:aws:cloudformation:us-east-1:012345678910:stack/my-stack-with-resource-drift/489e5570-df85-11e7-a7d9-503acac5c0fd</StackId>
See Also
<LogicalResourceId>Queue</LogicalResourceId>
<ActualProperties>{
"ReceiveMessageWaitTimeSeconds":0, "DelaySeconds":120,
"RedrivePolicy":{
"deadLetterTargetArn":"arn:aws:sqs:us-east-1:012345678910:my-stack-with-resource-drift-DLQ-1BCY7HHD5QIM3",
"maxReceiveCount":12 },
"MessageRetentionPeriod":345600, "MaximumMessageSize":262144, "VisibilityTimeout":60,
"QueueName":"my-stack-with-resource-drift-Queue-494PBHCO76H4"
}
</ActualProperties>
<Timestamp>2017-12-28T23:51:49.616Z</Timestamp>
<ResourceType>AWS::SQS::Queue</ResourceType>
</StackResourceDrift>
</DetectStackResourceDriftResult>
<ResponseMetadata>
<RequestId>1229a48a-ec2a-11e7-a8e5-97a4c2fc6398</RequestId>
</ResponseMetadata>
</DetectStackResourceDriftResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DetectStackSetDrift
DetectStackSetDrift
Detect drift on a stack set. When CloudFormation performs drift detection on a stack set, it performs drift detection on the stack associated with each stack instance in the stack set. For more information, see How CloudFormation performs drift detection on a stack set.
DetectStackSetDrift returns the OperationId of the stack set drift detection operation. Use this operation id with DescribeStackSetOperation (p. 94) to monitor the progress of the drift detection operation. The drift detection operation may take some time, depending on the number of stack instances included in the stack set, in addition to the number of resources included in each stack.
Once the operation has completed, use the following actions to return drift information:
• Use DescribeStackSet (p. 91) to return detailed information about the stack set, including detailed information about the last completed drift operation performed on the stack set. (Information about drift operations that are in progress isn't included.)
• Use ListStackInstances (p. 144) to return a list of stack instances belonging to the stack set, including the drift status and last drift time checked of each instance.
• Use DescribeStackInstance (p. 76) to return detailed information about a specific stack instance, including its drift status and last drift time checked.
For more information about performing a drift detection operation on a stack set, see Detecting unmanaged changes in stack sets.
You can only run a single drift detection operation on a given stack set at one time.
To stop a drift detection stack set operation, use StopStackSetOperation (p. 198) .
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
CallAs
[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.
By default, SELF is specified. Use SELF for stack sets with self-managed permissions.
• If you are signed in to the management account, specify SELF.
• If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.
Your AWS account must be registered as a delegated administrator in the management account.
For more information, see Register a delegated administrator in the AWS CloudFormation User Guide.
Type: String
Valid Values: SELF | DELEGATED_ADMIN Required: No
OperationId
The ID of the stack set operation.
Type: String
Response Elements
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*
Required: No OperationPreferences
The user-specified preferences for how AWS CloudFormation performs a stack set operation.
For more information about maximum concurrent accounts and failure tolerance, see Stack set operation options.
Type: StackSetOperationPreferences (p. 305) object Required: No
StackSetName
The name of the stack set on which to perform the drift detection operation.
Type: String
Pattern: [a-zA-Z][-a-zA-Z0-9]*(?::[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]
{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})?
Required: Yes
Response Elements
The following element is returned by the service.
OperationId
The ID of the drift detection stack set operation.
You can use this operation ID with DescribeStackSetOperation (p. 94) to monitor the progress of the drift detection operation.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
InvalidOperation
The specified operation isn't valid.
HTTP Status Code: 400 OperationInProgress
Another operation is currently in progress for this stack set. Only one operation can be performed for a stack set at a given time.
HTTP Status Code: 409
Examples
StackSetNotFound
The specified stack set doesn't exist.
HTTP Status Code: 404
Examples
DetectStackSetDrift
This example illustrates one usage of DetectStackSetDrift.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=DetectStackSetDrift &Version=2010-05-15
&StackSetName=stack-set-example
&OperationId=9cc082fa-df4c-45cd-b9a8-7e56example &X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20191203T195756Z
&X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]
Sample Response
<DetectStackSetDriftResponse xmlns="http://internal.amazon.com/coral/
com.amazonaws.maestro.service.v20160713/">
<DetectStackSetDriftResult>
<OperationId>9cc082fa-df4c-45cd-b9a8-7e56example</OperationId>
</DetectStackSetDriftResult>
<ResponseMetadata>
<RequestId>38309f0a-d5f5-4330-b6ca-8eb1example</RequestId>
</ResponseMetadata>
</DetectStackSetDriftResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
EstimateTemplateCost
EstimateTemplateCost
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 Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
Parameters.member.N
A list of Parameter structures that specify input parameters.
Type: Array of Parameter (p. 249) objects Required: No
TemplateBody
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.
Type: String
Length Constraints: Minimum length of 1.
Required: No TemplateURL
Location of file containing the template body. The URL must point to a template that's located in an Amazon S3 bucket or a Systems Manager document. 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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
Response Elements
The following element is returned by the service.
Url
An AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
Type: String
Errors
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
Examples
EstimateTemplateCost
This example illustrates one usage of EstimateTemplateCost.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=EstimateTemplateCost
&TemplateURL= https://s3.amazonaws.com/cloudformation-samples-us-east-1/
Drupal_Simple.template &Version=2010-05-15 &SignatureVersion=2
&Timestamp=2011-12-04T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID]
&Signature=[Signature]
Sample Response
<Response xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">
<EstimateTemplateCostResult>
<Url>http://calculator.s3.amazonaws.com/calc5.html?key=cf-2e351785-e821-450c-9d58-625e1e1ebfb6</Url>
</EstimateTemplateCostResult>
<ResponseMetadata>
<RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId>
</ResponseMetadata>
</Response>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
ExecuteChangeSet
ExecuteChangeSet
Updates a stack using the input information that was provided when the specified change set was created. After the call successfully completes, AWS CloudFormation starts updating the stack. Use the DescribeStacks (p. 88) action to view the status of the update.
When you execute a change set, AWS CloudFormation deletes all other change sets associated with the stack because they aren't valid for the updated stack.
If a stack policy is associated with the stack, AWS CloudFormation enforces the policy during the update.
You can't specify a temporary stack policy that overrides the current policy.
To create a change set for the entire stack hierarchy, IncludeNestedStacks must have been set to True.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
ChangeSetName
The name or Amazon Resource Name (ARN) of the change set that you want use to update the specified stack.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [a-zA-Z][-a-zA-Z0-9]*|arn:[-a-zA-Z0-9:/]*
Required: Yes ClientRequestToken
A unique identifier for this ExecuteChangeSet request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to execute a change set to update a stack with the same name. You might retry ExecuteChangeSet requests to ensure that AWS CloudFormation successfully received them.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*
Required: No DisableRollback
Preserves the state of previously provisioned resources when an operation fails.
Default: True Type: Boolean Required: No StackName
If you specified the name of a change set, specify the stack name or Amazon Resource Name (ARN) that's associated with the change set you want to execute.
Errors
Type: String
Length Constraints: Minimum length of 1.
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)
Required: No
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
ChangeSetNotFound
The specified change set name or ID doesn't exit. To view valid change sets for a stack, use the ListChangeSets operation.
HTTP Status Code: 404 InsufficientCapabilities
The template contains resources with capabilities that weren't specified in the Capabilities parameter.
HTTP Status Code: 400 InvalidChangeSetStatus
The specified change set can't be used to update the stack. For example, the change set status might be CREATE_IN_PROGRESS, or the stack status might be UPDATE_IN_PROGRESS.
HTTP Status Code: 400 TokenAlreadyExists
A client request token already exists.
HTTP Status Code: 400
Examples
ExecuteChangeSet
This example illustrates one usage of ExecuteChangeSet.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=ExecuteChangeSet
&ChangeSetName=arn:aws:cloudformation:us-east-1:123456789012:changeSet/
SampleChangeSet/12a3b456-0e10-4ce0-9052-5d484a8c4e5b &Version=2010-05-15
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20160316T233349Z
&X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]
See Also
Sample Response
<ExecuteChangeSetResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">
<ExecuteChangeSetResult/>
<ResponseMetadata>
<RequestId>5ccc7dcd-744c-11e5-be70-example</RequestId>
</ResponseMetadata>
</ExecuteChangeSetResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
GetStackPolicy
GetStackPolicy
Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 329).
StackName
The name or unique stack ID that's associated with the stack whose policy you want to get.
Type: String Required: Yes
Response Elements
The following element is returned by the service.
StackPolicyBody
Structure containing the stack policy body. (For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide.)
Type: String
Length Constraints: Minimum length of 1. Maximum length of 16384.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 331).
Examples
GetStackPolicy
This example illustrates one usage of GetStackPolicy.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=GetStackPolicy &StackName=MyStack &Version=2010-05-15 &SignatureVersion=2
&Timestamp=2010-07-27T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID]
&Signature=[Signature]
Sample Response
See Also
<GetStackPolicyResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">
<GetStackPolicyResult>
<StackPolicyBody>"{
"Statement" : [ {
"Effect" : "Deny", "Action" : "Update:*", "Principal" : "*",
"Resource" : "LogicalResourceId/ProductionDatabase"
}, {
"Effect" : "Allow", "Action" : "Update:*", "Principal" : "*", "Resource" : "*"
} ]
}</StackPolicyBody>
</GetStackPolicyResult>
<ResponseMetadata>
<RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId>
</ResponseMetadata>
</GetStackPolicyResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
GetTemplate
GetTemplate
Returns the template body for a specified stack. You can get the template for running or deleted stacks.
Returns the template body for a specified stack. You can get the template for running or deleted stacks.