Update Stack
cloudformation_update_stack | R Documentation |
Updates a stack as specified in the template¶
Description¶
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 through the describe_stacks
action.
To get a copy of the template for an existing stack, you can use the
get_template
action.
For more information about updating a stack and monitoring the progress of the update, see Managing Amazon Web Services resources as a single unit with CloudFormation stacks in the CloudFormation User Guide.
Usage¶
cloudformation_update_stack(StackName, TemplateBody, TemplateURL,
UsePreviousTemplate, StackPolicyDuringUpdateBody,
StackPolicyDuringUpdateURL, Parameters, Capabilities, ResourceTypes,
RoleARN, RollbackConfiguration, StackPolicyBody, StackPolicyURL,
NotificationARNs, Tags, DisableRollback, ClientRequestToken,
RetainExceptOnCreate)
Arguments¶
StackName |
[required] The name or unique stack ID of the stack to update. |
TemplateBody |
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. Conditional: You must specify only one of the following parameters:
|
TemplateURL |
The URL of a 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. The location for an Amazon S3 bucket must start with
Conditional: You must specify only one of the following parameters:
|
UsePreviousTemplate |
Reuse the existing template that is associated with the stack that you are updating. Conditional: You must specify only one of the following parameters:
|
StackPolicyDuringUpdateBody |
Structure containing the temporary overriding stack policy body.
You can specify either the If you want to update protected resources, specify a temporary overriding stack policy during this update. If you don't specify a stack policy, the current policy that is associated with the stack will be used. |
StackPolicyDuringUpdateURL |
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. The location for an Amazon S3
bucket must start with If you want to update protected resources, specify a temporary overriding stack policy during this update. If you don't specify a stack policy, the current policy that is associated with the stack will be used. |
Parameters |
A list of |
Capabilities |
In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to update the stack.
Only one of the |
ResourceTypes |
The template resource types that you have permissions to work
with for this update stack action, such as If the list of resource types doesn't include a resource that you're updating, the stack update fails. By default, CloudFormation grants permissions to all resource types. IAM uses this parameter for CloudFormation-specific condition keys in IAM policies. For more information, see Control access with Identity and Access Management. Only one of the |
RoleARN |
The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to update the stack. CloudFormation uses the role's credentials to make calls on your behalf. CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege. If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that is generated from your user credentials. |
RollbackConfiguration |
The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards. |
StackPolicyBody |
Structure containing a new stack policy body. You can specify
either the You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you don't specify a stack policy, the current policy that is associated with the stack is unchanged. |
StackPolicyURL |
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. The location for an Amazon S3 bucket must
start with You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you don't specify a stack policy, the current policy that is associated with the stack is unchanged. |
NotificationARNs |
Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that CloudFormation associates with the stack. Specify an empty list to remove all notification topics. |
Tags |
Key-value pairs to associate with this stack. CloudFormation also propagates these tags to supported resources in the stack. You can specify a maximum number of 50 tags. If you don't specify this parameter, CloudFormation doesn't modify the stack's tags. If you specify an empty value, CloudFormation removes all associated tags. |
DisableRollback |
Preserve the state of previously provisioned resources when an operation fails. Default: |
ClientRequestToken |
A unique identifier for this All events triggered by a given stack operation are assigned the same
client request token, which you can use to track operations. For
example, if you execute a In the console, stack operations display the client request token on
the Events tab. Stack operations that are initiated from the console use
the token format Console-StackOperation-ID, which helps you
easily identify the stack operation . For example, if you create a stack
using the console, each stack event would be assigned the same token in
the following format: |
RetainExceptOnCreate |
When set to Default: |
Value¶
A list with the following syntax:
list(
StackId = "string"
)
Request syntax¶
svc$update_stack(
StackName = "string",
TemplateBody = "string",
TemplateURL = "string",
UsePreviousTemplate = TRUE|FALSE,
StackPolicyDuringUpdateBody = "string",
StackPolicyDuringUpdateURL = "string",
Parameters = list(
list(
ParameterKey = "string",
ParameterValue = "string",
UsePreviousValue = TRUE|FALSE,
ResolvedValue = "string"
)
),
Capabilities = list(
"CAPABILITY_IAM"|"CAPABILITY_NAMED_IAM"|"CAPABILITY_AUTO_EXPAND"
),
ResourceTypes = list(
"string"
),
RoleARN = "string",
RollbackConfiguration = list(
RollbackTriggers = list(
list(
Arn = "string",
Type = "string"
)
),
MonitoringTimeInMinutes = 123
),
StackPolicyBody = "string",
StackPolicyURL = "string",
NotificationARNs = list(
"string"
),
Tags = list(
list(
Key = "string",
Value = "string"
)
),
DisableRollback = TRUE|FALSE,
ClientRequestToken = "string",
RetainExceptOnCreate = TRUE|FALSE
)