set_alias¶
Operation¶
set_alias
¶
set_alias(request: SetAliasInput | SetAliasInputDict | None = None, /, *, 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 |
|---|---|---|---|
request
|
SetAliasInput | SetAliasInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[SetAliasInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
SetAliasOutput
|
An instance of |
set_alias
async
¶
set_alias(request: SetAliasInput | SetAliasInputDict | None = None, /, *, 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 |
|---|---|---|---|
request
|
SetAliasInput | SetAliasInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[SetAliasInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
SetAliasOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
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.
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.
Output¶
SetAliasOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for SetAliasOutput structure.