Removes an alias from a stack. After the alias is removed successfully, it can no longer be used to reference the stack in API calls.
Parameters:
Raises:
Examples:
Example – Remove an alias from a stack
The following example removes the alias MyAlias from your stack:
>>> client.remove_alias(alias_name='MyAlias')
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
| def remove_alias(
self,
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
alias_name: Optional["capo_cloudformation.types.alias_name.AliasName"] = None,
) -> None:
"""<p>Removes an alias from a stack. After the alias is removed successfully, it can no longer be used to reference the stack in API calls.</p>
Args:
alias_name: <p>The alias name to remove.</p>
Raises:
capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Example – Remove an alias from a stack
The following example removes the alias MyAlias from your stack:
>>> client.remove_alias(alias_name='MyAlias')
"""
def _handler(
req: "OperationRequest[capo_cloudformation.types.remove_alias_input.RemoveAliasInput]",
) -> OperationResponse[None]:
import capo_cloudformation._operations.cloud_formation.remove_alias
output, http_response = (
capo_cloudformation._operations.cloud_formation.remove_alias.remove_alias(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RemoveAlias")
)
input_: capo_cloudformation.types.remove_alias_input.RemoveAliasInput = {}
if alias_name is not None:
input_["alias_name"] = alias_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|