Skip to content

CloudFormationClient.update_stack

rboto-cloudformation==0.4.0 · Service index · Types

Model summary (excerpt): 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 DescribeStacks action. To get a copy of the template for an existing stack, you can use the GetTemplate action. For more information about updating a stack and monitoring the progress of the update, see Managing Amazon Web Services...

Install and imports

python -m pip install "rboto[cloudformation]==0.4.0"
from rboto import CloudFormationClient
from collections.abc import Sequence
from rboto_cloudformation.types import (
    Capability,
    DeploymentConfig,
    Parameter,
    RollbackConfiguration,
    Tag,
    UpdateStackOutput,
)

Signature

async def update_stack(
    *,
    stack_name: str,
    template_body: str | None = None,
    template_url: str | None = None,
    use_previous_template: bool | None = None,
    stack_policy_during_update_body: str | None = None,
    stack_policy_during_update_url: str | None = None,
    parameters: Sequence[Parameter] | None = None,
    capabilities: Sequence[Capability] | None = None,
    resource_types: Sequence[str] | None = None,
    role_arn: str | None = None,
    rollback_configuration: RollbackConfiguration | None = None,
    stack_policy_body: str | None = None,
    stack_policy_url: str | None = None,
    notification_arns: Sequence[str] | None = None,
    tags: Sequence[Tag] | None = None,
    disable_rollback: bool | None = None,
    client_request_token: str | None = None,
    retain_except_on_create: bool | None = None,
    deployment_config: DeploymentConfig | None = None,
    disable_validation: bool | None = None,
) -> UpdateStackOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
stack_name Yes The name or unique stack ID of the stack to update.
template_body No Structure that contains 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: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
template_url No The URL of a file that contains 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 https:// . Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
use_previous_template No Reuse the existing template that is associated with the stack that you are updating. When using templates with the AWS::LanguageExtensions transform, provide the template instead of using UsePreviousTemplate to ensure new parameter values and Systems Manager parameter updates are applied correctly. For more information, see AWS::LanguageExtensions transform . Conditional: You must specify only...
stack_policy_during_update_body No Structure that contains 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 don't specify a stack policy, the current policy that is associated with the stack will be used.
stack_policy_during_update_url No Location of a file that contains 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 https:// . URLs from S3 static websites are not supported. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not...
parameters No A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
capabilities No In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to update the stack. CAPABILITY_IAM and CAPABILITY_NAMED_IAM Some stack templates might include resources that can affect permissions in your Amazon Web Services account, for example, by creating new IAM users. For those stacks, you must explicitly acknowledge this...
resource_types No Specifies which resource types you can work with, such as AWS::EC2::Instance or Custom::MyCustomInstance . 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...
role_arn No 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...
rollback_configuration No The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.
stack_policy_body No Structure that contains 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 don't specify a stack policy, the current policy that is associated with the stack is unchanged.
stack_policy_url No Location of a file that contains 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 https:// . URLs from S3 static websites are not supported. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both. You might update the stack...
notification_arns No 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 No 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.
disable_rollback No Preserve the state of previously provisioned resources when an operation fails. Default: False
client_request_token No A unique identifier for this UpdateStack request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to update a stack with the same name. You might retry UpdateStack requests to ensure that CloudFormation successfully received them. All events triggered by a given stack operation are assigned the same client request token, which you can...
retain_except_on_create No When set to true , newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of Retain . Default: false
deployment_config No The deployment configuration for this stack operation, including the deployment mode.
disable_validation No Set to true to disable pre-deployment validations in changeset or stack operations. Default: false

Output

UpdateStackOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
stack_id str | None Always present —
operation_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

Capability, DeploymentConfig, Parameter, RollbackConfiguration, Tag, UpdateStackOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudformation.exceptions:

InsufficientCapabilitiesError, TokenAlreadyExistsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model