set_alias¶
Operation¶
set_alias
async
¶
set_alias(request: SetAliasInput | SetAliasInputDict, /, *, plugins: list[Plugin] | None = None) -> SetAliasOutput
set_alias(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[SetAliasInputDict]) -> SetAliasOutput
Assigns an alias to an existing stack. An alias is an alternative name
for a stack that can be used in place of the stack name in any
CloudFormation API call that accepts the StackName parameter. This
enables you to effectively rename a stack without recreating it.
After setting an alias, both the original stack name and the alias resolve to the same stack. Setting an alias does not change the stack's ARN, physical resource IDs, or any deployed resources.
Note
Each stack can have at most one alias. To change a stack's alias, first remove the existing alias using RemoveAlias, then set a new one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
SetAliasOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
SetAliasInput
dataclass
¶
Bases: _SerdeShape
The input for the SetAlias action.
Attributes¶
alias_name
class-attribute
instance-attribute
¶
alias_name: str | None = ...
The alias to assign to the stack. The alias can then be used in place of
the stack name in any API call that accepts StackName.
The name must be unique within the same account and Region. It cannot match an existing stack name or another active alias.
Note
An alias name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 128 characters.
Dictionaries¶
SetAliasInputDict
¶
Bases: TypedDict
Dictionary form of SetAliasInput.
Attributes¶
alias_name
instance-attribute
¶
The alias to assign to the stack. The alias can then be used in place of
the stack name in any API call that accepts StackName.
The name must be unique within the same account and Region. It cannot match an existing stack name or another active alias.
Note
An alias name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 128 characters.
Output¶
SetAliasOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for SetAliasOutput structure.