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.CreatedButModifiedException,
    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.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_stack#

Creates a stack as specified in the template.

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

# create_stack method definition

def create_stack(
    self,
    *,
    StackName: str,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    DisableRollback: bool = ...,
    RollbackConfiguration: RollbackConfigurationTypeDef = ...,  # (2)
    TimeoutInMinutes: int = ...,
    NotificationARNs: Sequence[str] = ...,
    Capabilities: Sequence[CapabilityType] = ...,  # (3)
    ResourceTypes: Sequence[str] = ...,
    RoleARN: str = ...,
    OnFailure: OnFailureType = ...,  # (4)
    StackPolicyBody: str = ...,
    StackPolicyURL: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (5)
    ClientRequestToken: str = ...,
    EnableTerminationProtection: bool = ...,
    RetainExceptOnCreate: bool = ...,
) -> CreateStackOutputTypeDef:  # (6)
    ...
  1. See ParameterTypeDef
  2. See RollbackConfigurationTypeDef
  3. See CapabilityType
  4. See OnFailureType
  5. See TagTypeDef
  6. See CreateStackOutputTypeDef
# create_stack method usage example with argument unpacking

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

parent.create_stack(**kwargs)
  1. See CreateStackInputRequestTypeDef

create_stack_instances#

Creates stack instances for the specified accounts, within the specified Amazon Web Services Regions.

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

# create_stack_instances method definition

def create_stack_instances(
    self,
    *,
    StackSetName: str,
    Regions: Sequence[str],
    Accounts: Sequence[str] = ...,
    DeploymentTargets: DeploymentTargetsTypeDef = ...,  # (1)
    ParameterOverrides: Sequence[ParameterTypeDef] = ...,  # (2)
    OperationPreferences: StackSetOperationPreferencesTypeDef = ...,  # (3)
    OperationId: str = ...,
    CallAs: CallAsType = ...,  # (4)
) -> CreateStackInstancesOutputTypeDef:  # (5)
    ...
  1. See DeploymentTargetsTypeDef
  2. See ParameterTypeDef
  3. See StackSetOperationPreferencesTypeDef
  4. See CallAsType
  5. See CreateStackInstancesOutputTypeDef
# create_stack_instances method usage example with argument unpacking

kwargs: CreateStackInstancesInputRequestTypeDef = {  # (1)
    "StackSetName": ...,
    "Regions": ...,
}

parent.create_stack_instances(**kwargs)
  1. See CreateStackInstancesInputRequestTypeDef

create_stack_set#

Creates a stack set.

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

# create_stack_set method definition

def create_stack_set(
    self,
    *,
    StackSetName: str,
    Description: str = ...,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    StackId: str = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    Capabilities: Sequence[CapabilityType] = ...,  # (2)
    Tags: Sequence[TagTypeDef] = ...,  # (3)
    AdministrationRoleARN: str = ...,
    ExecutionRoleName: str = ...,
    PermissionModel: PermissionModelsType = ...,  # (4)
    AutoDeployment: AutoDeploymentTypeDef = ...,  # (5)
    CallAs: CallAsType = ...,  # (6)
    ClientRequestToken: str = ...,
    ManagedExecution: ManagedExecutionTypeDef = ...,  # (7)
) -> CreateStackSetOutputTypeDef:  # (8)
    ...
  1. See ParameterTypeDef
  2. See CapabilityType
  3. See TagTypeDef
  4. See PermissionModelsType
  5. See AutoDeploymentTypeDef
  6. See CallAsType
  7. See ManagedExecutionTypeDef
  8. See CreateStackSetOutputTypeDef
# create_stack_set method usage example with argument unpacking

kwargs: CreateStackSetInputRequestTypeDef = {  # (1)
    "StackSetName": ...,
}

parent.create_stack_set(**kwargs)
  1. See CreateStackSetInputRequestTypeDef

deactivate_organizations_access#

Deactivates trusted access with Organizations.

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

# deactivate_organizations_access method definition

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

deactivate_type#

Deactivates a public extension that was previously activated in this account and Region.

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

# deactivate_type method definition

def deactivate_type(
    self,
    *,
    TypeName: str = ...,
    Type: ThirdPartyTypeType = ...,  # (1)
    Arn: str = ...,
) -> Dict[str, Any]:
    ...
  1. See ThirdPartyTypeType
# deactivate_type method usage example with argument unpacking

kwargs: DeactivateTypeInputRequestTypeDef = {  # (1)
    "TypeName": ...,
}

parent.deactivate_type(**kwargs)
  1. See DeactivateTypeInputRequestTypeDef

delete_change_set#

Deletes the specified change set.

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

# delete_change_set method definition

def delete_change_set(
    self,
    *,
    ChangeSetName: str,
    StackName: str = ...,
) -> Dict[str, Any]:
    ...
# delete_change_set method usage example with argument unpacking

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

parent.delete_change_set(**kwargs)
  1. See DeleteChangeSetInputRequestTypeDef

delete_stack#

Deletes a specified stack.

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

# delete_stack method definition

def delete_stack(
    self,
    *,
    StackName: str,
    RetainResources: Sequence[str] = ...,
    RoleARN: str = ...,
    ClientRequestToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_stack method usage example with argument unpacking

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

parent.delete_stack(**kwargs)
  1. See DeleteStackInputRequestTypeDef

delete_stack_instances#

Deletes stack instances for the specified accounts, in the specified Amazon Web Services Regions.

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

# delete_stack_instances method definition

def delete_stack_instances(
    self,
    *,
    StackSetName: str,
    Regions: Sequence[str],
    RetainStacks: bool,
    Accounts: Sequence[str] = ...,
    DeploymentTargets: DeploymentTargetsTypeDef = ...,  # (1)
    OperationPreferences: StackSetOperationPreferencesTypeDef = ...,  # (2)
    OperationId: str = ...,
    CallAs: CallAsType = ...,  # (3)
) -> DeleteStackInstancesOutputTypeDef:  # (4)
    ...
  1. See DeploymentTargetsTypeDef
  2. See StackSetOperationPreferencesTypeDef
  3. See