Skip to content

CloudFormationClient#

Index > CloudFormation > CloudFormationClient

Auto-generated documentation for CloudFormation type annotations stubs module mypy-boto3-cloudformation.

CloudFormationClient#

Type annotations and code completion for boto3.client("cloudformation"). boto3 documentation

# CloudFormationClient usage example

from boto3.session import Session
from mypy_boto3_cloudformation.client import CloudFormationClient

def get_cloudformation_client() -> CloudFormationClient:
    return Session().client("cloudformation")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("cloudformation").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("cloudformation")

try:
    do_something(client)
except (
    client.exceptions.AlreadyExistsException,
    client.exceptions.CFNRegistryException,
    client.exceptions.ChangeSetNotFoundException,
    client.exceptions.ClientError,
    client.exceptions.ConcurrentResourcesLimitExceededException,
    client.exceptions.CreatedButModifiedException,
    client.exceptions.GeneratedTemplateNotFoundException,
    client.exceptions.InsufficientCapabilitiesException,
    client.exceptions.InvalidChangeSetStatusException,
    client.exceptions.InvalidOperationException,
    client.exceptions.InvalidStateTransitionException,
    client.exceptions.LimitExceededException,
    client.exceptions.NameAlreadyExistsException,
    client.exceptions.OperationIdAlreadyExistsException,
    client.exceptions.OperationInProgressException,
    client.exceptions.OperationNotFoundException,
    client.exceptions.OperationStatusCheckFailedException,
    client.exceptions.ResourceScanInProgressException,
    client.exceptions.ResourceScanLimitExceededException,
    client.exceptions.ResourceScanNotFoundException,
    client.exceptions.StackInstanceNotFoundException,
    client.exceptions.StackNotFoundException,
    client.exceptions.StackSetNotEmptyException,
    client.exceptions.StackSetNotFoundException,
    client.exceptions.StaleRequestException,
    client.exceptions.TokenAlreadyExistsException,
    client.exceptions.TypeConfigurationNotFoundException,
    client.exceptions.TypeNotFoundException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_cloudformation.client import Exceptions

def handle_error(exc: Exceptions.AlreadyExistsException) -> None:
    ...

Methods#

activate_organizations_access#

Activate trusted access with Organizations.

Type annotations and code completion for boto3.client("cloudformation").activate_organizations_access method. boto3 documentation

# activate_organizations_access method definition

def activate_organizations_access(
    self,
) -> Dict[str, Any]:
    ...

activate_type#

Activates a public third-party extension, making it available for use in stack templates.

Type annotations and code completion for boto3.client("cloudformation").activate_type method. boto3 documentation

# activate_type method definition

def activate_type(
    self,
    *,
    Type: ThirdPartyTypeType = ...,  # (1)
    PublicTypeArn: str = ...,
    PublisherId: str = ...,
    TypeName: str = ...,
    TypeNameAlias: str = ...,
    AutoUpdate: bool = ...,
    LoggingConfig: LoggingConfigTypeDef = ...,  # (2)
    ExecutionRoleArn: str = ...,
    VersionBump: VersionBumpType = ...,  # (3)
    MajorVersion: int = ...,
) -> ActivateTypeOutputTypeDef:  # (4)
    ...
  1. See ThirdPartyTypeType
  2. See LoggingConfigTypeDef
  3. See VersionBumpType
  4. See ActivateTypeOutputTypeDef
# activate_type method usage example with argument unpacking

kwargs: ActivateTypeInputRequestTypeDef = {  # (1)
    "Type": ...,
}

parent.activate_type(**kwargs)
  1. See ActivateTypeInputRequestTypeDef

batch_describe_type_configurations#

Returns configuration data for the specified CloudFormation extensions, from the CloudFormation registry for the account and Region.

Type annotations and code completion for boto3.client("cloudformation").batch_describe_type_configurations method. boto3 documentation

# batch_describe_type_configurations method definition

def batch_describe_type_configurations(
    self,
    *,
    TypeConfigurationIdentifiers: Sequence[TypeConfigurationIdentifierTypeDef],  # (1)
) -> BatchDescribeTypeConfigurationsOutputTypeDef:  # (2)
    ...
  1. See TypeConfigurationIdentifierTypeDef
  2. See BatchDescribeTypeConfigurationsOutputTypeDef
# batch_describe_type_configurations method usage example with argument unpacking

kwargs: BatchDescribeTypeConfigurationsInputRequestTypeDef = {  # (1)
    "TypeConfigurationIdentifiers": ...,
}

parent.batch_describe_type_configurations(**kwargs)
  1. See BatchDescribeTypeConfigurationsInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("cloudformation").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_update_stack#

Cancels an update on the specified stack.

Type annotations and code completion for boto3.client("cloudformation").cancel_update_stack method. boto3 documentation

# cancel_update_stack method definition

def cancel_update_stack(
    self,
    *,
    StackName: str,
    ClientRequestToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# cancel_update_stack method usage example with argument unpacking

kwargs: CancelUpdateStackInputRequestTypeDef = {  # (1)
    "StackName": ...,
}

parent.cancel_update_stack(**kwargs)
  1. See CancelUpdateStackInputRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("cloudformation").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

continue_update_rollback#

For a specified stack that's in the UPDATE_ROLLBACK_FAILED state, continues rolling it back to the UPDATE_ROLLBACK_COMPLETE state.

Type annotations and code completion for boto3.client("cloudformation").continue_update_rollback method. boto3 documentation

# continue_update_rollback method definition

def continue_update_rollback(
    self,
    *,
    StackName: str,
    RoleARN: str = ...,
    ResourcesToSkip: Sequence[str] = ...,
    ClientRequestToken: str = ...,
) -> Dict[str, Any]:
    ...
# continue_update_rollback method usage example with argument unpacking

kwargs: ContinueUpdateRollbackInputRequestTypeDef = {  # (1)
    "StackName": ...,
}

parent.continue_update_rollback(**kwargs)
  1. See ContinueUpdateRollbackInputRequestTypeDef

create_change_set#

Creates a list of changes that will be applied to a stack so that you can review the changes before executing them.

Type annotations and code completion for boto3.client("cloudformation").create_change_set method. boto3 documentation

# create_change_set method definition

def create_change_set(
    self,
    *,
    StackName: str,
    ChangeSetName: str,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    UsePreviousTemplate: bool = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    Capabilities: Sequence[CapabilityType] = ...,  # (2)
    ResourceTypes: Sequence[str] = ...,
    RoleARN: str = ...,
    RollbackConfiguration: RollbackConfigurationTypeDef = ...,  # (3)
    NotificationARNs: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (4)
    ClientToken: str = ...,
    Description: str = ...,
    ChangeSetType: ChangeSetTypeType = ...,  # (5)
    ResourcesToImport: Sequence[ResourceToImportTypeDef] = ...,  # (6)
    IncludeNestedStacks: bool = ...,
    OnStackFailure: OnStackFailureType = ...,  # (7)
    ImportExistingResources: bool = ...,
) -> CreateChangeSetOutputTypeDef:  # (8)
    ...
  1. See ParameterTypeDef
  2. See CapabilityType
  3. See RollbackConfigurationTypeDef
  4. See TagTypeDef
  5. See ChangeSetTypeType
  6. See ResourceToImportTypeDef
  7. See OnStackFailureType
  8. See CreateChangeSetOutputTypeDef
# create_change_set method usage example with argument unpacking

kwargs: CreateChangeSetInputRequestTypeDef = {  # (1)
    "StackName": ...,
    "ChangeSetName": ...,
}

parent.create_change_set(**kwargs)
  1. See CreateChangeSetInputRequestTypeDef

create_generated_template#

Creates a template from existing resources that are not already managed with CloudFormation.

Type annotations and code completion for boto3.client("cloudformation").create_generated_template method.