CloudFormationClient.create_change_set
rboto-cloudformation==0.4.0 · Service index · Types
Model summary (excerpt): Creates a list of changes that will be applied to a stack so that you can review the changes before executing them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set for a stack that doesn't exist, the change set shows all of the resources that CloudFormation will create. If you create a change set for an existing stack, CloudFormation...
Install and imports
from rboto import CloudFormationClient
from collections.abc import Sequence
from rboto_cloudformation.types import (
Capability,
ChangeSetType,
CreateChangeSetOutput,
DeploymentConfig,
DeploymentMode,
OnStackFailure,
Parameter,
ResourceToImport,
RollbackConfiguration,
Tag,
)
Signature
async def create_change_set(
*,
stack_name: str,
change_set_name: str,
template_body: str | None = None,
template_url: str | None = None,
use_previous_template: bool | 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,
notification_arns: Sequence[str] | None = None,
tags: Sequence[Tag] | None = None,
client_token: str | None = None,
description: str | None = None,
change_set_type: ChangeSetType | None = None,
resources_to_import: Sequence[ResourceToImport] | None = None,
include_nested_stacks: bool | None = None,
on_stack_failure: OnStackFailure | None = None,
import_existing_resources: bool | None = None,
deployment_mode: DeploymentMode | None = None,
deployment_config: DeploymentConfig | None = None,
disable_validation: bool | None = None,
) -> CreateChangeSetOutput: ...
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 the unique ID of the stack for which you are creating a change set. CloudFormation generates the change set by comparing this stack's information with the information that you submit, such as a modified template or different parameter input values. |
change_set_name |
Yes | The name of the change set. The name must be unique among all change sets that are associated with the specified stack. A change set name can contain only alphanumeric, case sensitive characters, and hyphens. It must start with an alphabetical character and can't exceed 128 characters. |
template_body |
No | A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum length of 51,200 bytes. CloudFormation generates the change set by comparing this template with the template of the stack that you specified. Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true . |
template_url |
No | The URL of the file that contains the revised template. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket or a Systems Manager document. CloudFormation generates the change set by comparing this template with the stack that you specified. The location for an Amazon S3 bucket must start with https:// . URLs from S3 static websites are not supported.... |
use_previous_template |
No | Whether to reuse the template that's associated with the stack to create the change set. 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... |
parameters |
No | A list of Parameter structures that specify input parameters for the change set. 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 create 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 type that you're updating, the stack update fails. By default, CloudFormation grants permissions to all resource types. IAM uses this parameter for condition keys in IAM policies for CloudFormation. For more information, see Control... |
role_arn |
No | The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes when executing the change set. CloudFormation uses the role's credentials to make calls on your behalf. CloudFormation 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.... |
rollback_configuration |
No | The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards. |
notification_arns |
No | The Amazon Resource Names (ARNs) of Amazon SNS topics that CloudFormation associates with the stack. To remove all associated notification topics, specify an empty list. |
tags |
No | Key-value pairs to associate with this stack. CloudFormation also propagates these tags to resources in the stack. You can specify a maximum of 50 tags. |
client_token |
No | A unique identifier for this CreateChangeSet request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to create another change set with the same name. You might retry CreateChangeSet requests to ensure that CloudFormation successfully received them. |
description |
No | A description to help you identify this change set. |
change_set_type |
No | The type of change set operation. To create a change set for a new stack, specify CREATE . To create a change set for an existing stack, specify UPDATE . To create a change set for an import operation, specify IMPORT . If you create a change set for a new stack, CloudFormation creates a stack with a unique stack ID, but no template or resources. The stack will be in the REVIEW_IN_PROGRESS... |
resources_to_import |
No | The resources to import into your stack. |
include_nested_stacks |
No | Creates a change set for the all nested stacks specified in the template. The default behavior of this action is set to False . To include nested sets in a change set, specify True . |
on_stack_failure |
No | Determines what action will be taken if stack creation fails. If this parameter is specified, the DisableRollback parameter to the ExecuteChangeSet API operation must not be specified. This must be one of these values: DELETE - Deletes the change set if the stack creation fails. This is only valid when the ChangeSetType parameter is set to CREATE . If the deletion of the stack fails, the... |
import_existing_resources |
No | Indicates if the change set auto-imports resources that already exist. For more information, see Import Amazon Web Services resources into a CloudFormation stack automatically in the CloudFormation User Guide . This parameter can only import resources that have custom names in templates. For more information, see name type in the CloudFormation User Guide . To import resources that do not... |
deployment_mode |
No | Determines how CloudFormation handles configuration drift during deployment. REVERT_DRIFT – Creates a drift-aware change set that brings actual resource states in line with template definitions. Provides a three-way comparison between actual state, previous deployment state, and desired state. For more information, see Using drift-aware change sets in the CloudFormation User Guide . |
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
CreateChangeSetOutput.
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 |
|---|---|---|---|
id |
str | None |
Always present | — |
stack_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.
Related types
Capability, ChangeSetType, CreateChangeSetOutput, DeploymentConfig, DeploymentMode, OnStackFailure, Parameter, ResourceToImport, RollbackConfiguration, Tag
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:
AlreadyExistsError, InsufficientCapabilitiesError, LimitExceededError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.