<a id="mypy-boto3-cloudformation"></a>

# mypy-boto3-cloudformation

[![PyPI - mypy-boto3-cloudformation](https://img.shields.io/pypi/v/mypy-boto3-cloudformation.svg?color=blue)](https://pypi.org/project/mypy-boto3-cloudformation)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mypy-boto3-cloudformation.svg?color=blue)](https://pypi.org/project/mypy-boto3-cloudformation)
[![Docs](https://img.shields.io/readthedocs/mypy-boto3-builder.svg?color=blue)](https://mypy-boto3-builder.readthedocs.io/)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/mypy-boto3-cloudformation?color=blue)](https://pypistats.org/packages/mypy-boto3-cloudformation)

![boto3.typed](https://github.com/vemel/mypy_boto3_builder/raw/master/logo.png)

Type annotations for
[boto3.CloudFormation 1.18.43](https://boto3.amazonaws.com/v1/documentation/api/1.18.43/reference/services/cloudformation.html#CloudFormation)
service compatible with [VSCode](https://code.visualstudio.com/),
[PyCharm](https://www.jetbrains.com/pycharm/),
[Emacs](https://www.gnu.org/software/emacs/),
[Sublime Text](https://www.sublimetext.com/),
[mypy](https://github.com/python/mypy),
[pyright](https://github.com/microsoft/pyright) and other tools.

Generated by
[mypy-boto3-builder 5.3.0](https://github.com/vemel/mypy_boto3_builder).

More information can be found on
[boto3-stubs](https://pypi.org/project/boto3-stubs/) page and in
[mypy-boto3-cloudformation docs](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_cloudformation/)

See how it helps to find and fix potential bugs:

![boto3-stubs demo](https://github.com/vemel/mypy_boto3_builder/raw/master/demo.gif)

- [mypy-boto3-cloudformation](#mypy-boto3-cloudformation)
  - [How to install](#how-to-install)
  - [Usage](#usage)
    - [VSCode](#vscode)
    - [PyCharm](#pycharm)
    - [Other IDEs](#other-ides)
    - [mypy](#mypy)
    - [pyright](#pyright)
  - [Explicit type annotations](#explicit-type-annotations)
    - [Client annotations](#client-annotations)
    - [Paginators annotations](#paginators-annotations)
    - [Waiters annotations](#waiters-annotations)
    - [Service Resource annotations](#service-resource-annotations)
    - [Other resources annotations](#other-resources-annotations)
    - [Collections annotations](#collections-annotations)
    - [Literals](#literals)
    - [Typed dictionaries](#typed-dictionaries)
  - [Versioning](#versioning)
  - [Documentation](#documentation)
  - [Support and contributing](#support-and-contributing)

<a id="how-to-install"></a>

## How to install

Install `boto3-stubs` for `CloudFormation` service.

```bash
python -m pip install boto3-stubs[cloudformation]
```

<a id="usage"></a>

## Usage

<a id="vscode"></a>

### VSCode

- Install
  [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- Install
  [Pylance extension](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
- Set `Pylance` as your Python Language Server
- Install `boto-stubs[cloudformation]` in your environment:
  `python -m pip install 'boto3-stubs[cloudformation]'`

Both type checking and auto-complete should work for `CloudFormation` service.
No explicit type annotations required, write your `boto3` code as usual.

<a id="pycharm"></a>

### PyCharm

- Install `boto-stubs[cloudformation]` in your environment:
  `python -m pip install 'boto3-stubs[cloudformation]'`

Both type checking and auto-complete should work for `CloudFormation` service.
No explicit type annotations required, write your `boto3` code as usual.
Auto-complete can be slow on big projects or if you have a lot of installed
`boto3-stubs` submodules.

<a id="other-ides"></a>

### Other IDEs

Not tested, but as long as your IDE supports `mypy` or `pyright`, everything
should work.

<a id="mypy"></a>

### mypy

- Install `mypy`: `python -m pip install mypy`
- Install `boto-stubs[cloudformation]` in your environment:
  `python -m pip install 'boto3-stubs[cloudformation]'`
- Run `mypy` as usual

Type checking should work for `CloudFormation` service. No explicit type
annotations required, write your `boto3` code as usual.

<a id="pyright"></a>

### pyright

- Install `pyright`: `yarn global add pyright`
- Install `boto-stubs[cloudformation]` in your environment:
  `python -m pip install 'boto3-stubs[cloudformation]'`
- Optionally, you can install `boto3-stubs` to `typings` folder.

Type checking should work for `CloudFormation` service. No explicit type
annotations required, write your `boto3` code as usual.

<a id="explicit-type-annotations"></a>

## Explicit type annotations

<a id="client-annotations"></a>

### Client annotations

`CloudFormationClient` provides annotations for
`boto3.client("cloudformation")`.

```python
import boto3

from mypy_boto3_cloudformation import CloudFormationClient

client: CloudFormationClient = boto3.client("cloudformation")

# now client usage is checked by mypy and IDE should provide code auto-complete

# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudFormationClient = session.client("cloudformation")
```

<a id="paginators-annotations"></a>

### Paginators annotations

`mypy_boto3_cloudformation.paginator` module contains type annotations for all
paginators.

```python
from mypy_boto3_cloudformation import CloudFormationClient
from mypy_boto3_cloudformation.paginator import (
    DescribeAccountLimitsPaginator,
    DescribeChangeSetPaginator,
    DescribeStackEventsPaginator,
    DescribeStacksPaginator,
    ListChangeSetsPaginator,
    ListExportsPaginator,
    ListImportsPaginator,
    ListStackInstancesPaginator,
    ListStackResourcesPaginator,
    ListStackSetOperationResultsPaginator,
    ListStackSetOperationsPaginator,
    ListStackSetsPaginator,
    ListStacksPaginator,
    ListTypesPaginator,
)

client: CloudFormationClient = boto3.client("cloudformation")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_account_limits_paginator: DescribeAccountLimitsPaginator = client.get_paginator("describe_account_limits")
describe_change_set_paginator: DescribeChangeSetPaginator = client.get_paginator("describe_change_set")
describe_stack_events_paginator: DescribeStackEventsPaginator = client.get_paginator("describe_stack_events")
describe_stacks_paginator: DescribeStacksPaginator = client.get_paginator("describe_stacks")
list_change_sets_paginator: ListChangeSetsPaginator = client.get_paginator("list_change_sets")
list_exports_paginator: ListExportsPaginator = client.get_paginator("list_exports")
list_imports_paginator: ListImportsPaginator = client.get_paginator("list_imports")
list_stack_instances_paginator: ListStackInstancesPaginator = client.get_paginator("list_stack_instances")
list_stack_resources_paginator: ListStackResourcesPaginator = client.get_paginator("list_stack_resources")
list_stack_set_operation_results_paginator: ListStackSetOperationResultsPaginator = client.get_paginator("list_stack_set_operation_results")
list_stack_set_operations_paginator: ListStackSetOperationsPaginator = client.get_paginator("list_stack_set_operations")
list_stack_sets_paginator: ListStackSetsPaginator = client.get_paginator("list_stack_sets")
list_stacks_paginator: ListStacksPaginator = client.get_paginator("list_stacks")
list_types_paginator: ListTypesPaginator = client.get_paginator("list_types")
```

<a id="waiters-annotations"></a>

### Waiters annotations

`mypy_boto3_cloudformation.waiter` module contains type annotations for all
waiters.

```python
from mypy_boto3_cloudformation import CloudFormationClient
from mypy_boto3_cloudformation.waiter import (
    ChangeSetCreateCompleteWaiter,
    StackCreateCompleteWaiter,
    StackDeleteCompleteWaiter,
    StackExistsWaiter,
    StackImportCompleteWaiter,
    StackRollbackCompleteWaiter,
    StackUpdateCompleteWaiter,
    TypeRegistrationCompleteWaiter,
)

client: CloudFormationClient = boto3.client("cloudformation")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
change_set_create_complete_waiter: ChangeSetCreateCompleteWaiter = client.get_waiter("change_set_create_complete")
stack_create_complete_waiter: StackCreateCompleteWaiter = client.get_waiter("stack_create_complete")
stack_delete_complete_waiter: StackDeleteCompleteWaiter = client.get_waiter("stack_delete_complete")
stack_exists_waiter: StackExistsWaiter = client.get_waiter("stack_exists")
stack_import_complete_waiter: StackImportCompleteWaiter = client.get_waiter("stack_import_complete")
stack_rollback_complete_waiter: StackRollbackCompleteWaiter = client.get_waiter("stack_rollback_complete")
stack_update_complete_waiter: StackUpdateCompleteWaiter = client.get_waiter("stack_update_complete")
type_registration_complete_waiter: TypeRegistrationCompleteWaiter = client.get_waiter("type_registration_complete")
```

<a id="service-resource-annotations"></a>

### Service Resource annotations

`CloudFormationServiceResource` provides annotations for
`boto3.resource("cloudformation")`.

```python
from mypy_boto3_cloudformation import CloudFormationServiceResource

resource: CloudFormationServiceResource = boto3.resource("cloudformation")

# now resource usage is checked by mypy and IDE should provide code auto-complete

# works for session as well
session = boto3.session.Session(region="us-west-1")
session_resource: CloudFormationServiceResource = session.resource("cloudformation")
```

<a id="other-resources-annotations"></a>

### Other resources annotations

`mypy_boto3_cloudformation.service_resource` module contains type annotations
for all resources.

```python
from mypy_boto3_cloudformation import CloudFormationServiceResource
from mypy_boto3_cloudformation.service_resource import (
    Event,
    Stack,
    StackResource,
    StackResourceSummary,
)

resource: CloudFormationServiceResource = boto3.resource("cloudformation")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
my_event: Event = resource.Event(...)
my_stack: Stack = resource.Stack(...)
my_stack_resource: StackResource = resource.StackResource(...)
my_stack_resource_summary: StackResourceSummary = resource.StackResourceSummary(...)
```

<a id="collections-annotations"></a>

### Collections annotations

`mypy_boto3_cloudformation.service_resource` module contains type annotations
for all `CloudFormationServiceResource` collections.

```python
from mypy_boto3_cloudformation import CloudFormationServiceResource
from mypy_boto3_cloudformation.service_resource import (
    ServiceResourceStacksCollection,
)

resource: CloudFormationServiceResource = boto3.resource("cloudformation")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
stacks: cloudformation_resources.ServiceResourceStacksCollection = resource.stacks
```

<a id="literals"></a>

### Literals

`mypy_boto3_cloudformation.literals` module contains literals extracted from
shapes that can be used in user code for type checking.

```python
from mypy_boto3_cloudformation.literals import (
    AccountGateStatusType,
    CallAsType,
    CapabilityType,
    CategoryType,
    ChangeActionType,
    ChangeSetCreateCompleteWaiterName,
    ChangeSetStatusType,
    ChangeSetTypeType,
    ChangeSourceType,
    ChangeTypeType,
    DeprecatedStatusType,
    DescribeAccountLimitsPaginatorName,
    DescribeChangeSetPaginatorName,
    DescribeStackEventsPaginatorName,
    DescribeStacksPaginatorName,
    DifferenceTypeType,
    EvaluationTypeType,
    ExecutionStatusType,
    HandlerErrorCodeType,
    IdentityProviderType,
    ListChangeSetsPaginatorName,
    ListExportsPaginatorName,
    ListImportsPaginatorName,
    ListStackInstancesPaginatorName,
    ListStackResourcesPaginatorName,
    ListStackSetOperationResultsPaginatorName,
    ListStackSetOperationsPaginatorName,
    ListStackSetsPaginatorName,
    ListStacksPaginatorName,
    ListTypesPaginatorName,
    OnFailureType,
    OperationStatusType,
    PermissionModelsType,
    ProvisioningTypeType,
    PublisherStatusType,
    RegionConcurrencyTypeType,
    RegistrationStatusType,
    RegistryTypeType,
    ReplacementType,
    RequiresRecreationType,
    ResourceAttributeType,
    ResourceSignalStatusType,
    ResourceStatusType,
    StackCreateCompleteWaiterName,
    StackDeleteCompleteWaiterName,
    StackDriftDetectionStatusType,
    StackDriftStatusType,
    StackExistsWaiterName,
    StackImportCompleteWaiterName,
    StackInstanceDetailedStatusType,
    StackInstanceFilterNameType,
    StackInstanceStatusType,
    StackResourceDriftStatusType,
    StackRollbackCompleteWaiterName,
    StackSetDriftDetectionStatusType,
    StackSetDriftStatusType,
    StackSetOperationActionType,
    StackSetOperationResultStatusType,
    StackSetOperationStatusType,
    StackSetStatusType,
    StackStatusType,
    StackUpdateCompleteWaiterName,
    TemplateStageType,
    ThirdPartyTypeType,
    TypeRegistrationCompleteWaiterName,
    TypeTestsStatusType,
    VersionBumpType,
    VisibilityType,
    ServiceName,
)

def check_value(value: AccountGateStatusType) -> bool:
    ...
```

<a id="typed-dictionaries"></a>

### Typed dictionaries

`mypy_boto3_cloudformation.type_defs` module contains structures and shapes
assembled to typed dictionaries for additional type checking.

```python
from mypy_boto3_cloudformation.type_defs import (
    AccountGateResultTypeDef,
    AccountLimitTypeDef,
    ActivateTypeInputRequestTypeDef,
    ActivateTypeOutputTypeDef,
    AutoDeploymentTypeDef,
    BatchDescribeTypeConfigurationsErrorTypeDef,
    BatchDescribeTypeConfigurationsInputRequestTypeDef,
    BatchDescribeTypeConfigurationsOutputTypeDef,
    CancelUpdateStackInputRequestTypeDef,
    CancelUpdateStackInputStackTypeDef,
    ChangeSetSummaryTypeDef,
    ChangeTypeDef,
    ContinueUpdateRollbackInputRequestTypeDef,
    CreateChangeSetInputRequestTypeDef,
    CreateChangeSetOutputTypeDef,
    CreateStackInputRequestTypeDef,
    CreateStackInputServiceResourceTypeDef,
    CreateStackInstancesInputRequestTypeDef,
    CreateStackInstancesOutputTypeDef,
    CreateStackOutputTypeDef,
    CreateStackSetInputRequestTypeDef,
    CreateStackSetOutputTypeDef,
    DeactivateTypeInputRequestTypeDef,
    DeleteChangeSetInputRequestTypeDef,
    DeleteStackInputRequestTypeDef,
    DeleteStackInputStackTypeDef,
    DeleteStackInstancesInputRequestTypeDef,
    DeleteStackInstancesOutputTypeDef,
    DeleteStackSetInputRequestTypeDef,
    DeploymentTargetsTypeDef,
    DeregisterTypeInputRequestTypeDef,
    DescribeAccountLimitsInputRequestTypeDef,
    DescribeAccountLimitsOutputTypeDef,
    DescribeChangeSetInputRequestTypeDef,
    DescribeChangeSetOutputTypeDef,
    DescribePublisherInputRequestTypeDef,
    DescribePublisherOutputTypeDef,
    DescribeStackDriftDetectionStatusInputRequestTypeDef,
    DescribeStackDriftDetectionStatusOutputTypeDef,
    DescribeStackEventsInputRequestTypeDef,
    DescribeStackEventsOutputTypeDef,
    DescribeStackInstanceInputRequestTypeDef,
    DescribeStackInstanceOutputTypeDef,
    DescribeStackResourceDriftsInputRequestTypeDef,
    DescribeStackResourceDriftsOutputTypeDef,
    DescribeStackResourceInputRequestTypeDef,
    DescribeStackResourceOutputTypeDef,
    DescribeStackResourcesInputRequestTypeDef,
    DescribeStackResourcesOutputTypeDef,
    DescribeStackSetInputRequestTypeDef,
    DescribeStackSetOperationInputRequestTypeDef,
    DescribeStackSetOperationOutputTypeDef,
    DescribeStackSetOutputTypeDef,
    DescribeStacksInputRequestTypeDef,
    DescribeStacksOutputTypeDef,
    DescribeTypeInputRequestTypeDef,
    DescribeTypeOutputTypeDef,
    DescribeTypeRegistrationInputRequestTypeDef,
    DescribeTypeRegistrationOutputTypeDef,
    DetectStackDriftInputRequestTypeDef,
    DetectStackDriftOutputTypeDef,
    DetectStackResourceDriftInputRequestTypeDef,
    DetectStackResourceDriftOutputTypeDef,
    DetectStackSetDriftInputRequestTypeDef,
    DetectStackSetDriftOutputTypeDef,
    EstimateTemplateCostInputRequestTypeDef,
    EstimateTemplateCostOutputTypeDef,
    ExecuteChangeSetInputRequestTypeDef,
    ExportTypeDef,
    GetStackPolicyInputRequestTypeDef,
    GetStackPolicyOutputTypeDef,
    GetTemplateInputRequestTypeDef,
    GetTemplateOutputTypeDef,
    GetTemplateSummaryInputRequestTypeDef,
    GetTemplateSummaryOutputTypeDef,
    ImportStacksToStackSetInputRequestTypeDef,
    ImportStacksToStackSetOutputTypeDef,
    ListChangeSetsInputRequestTypeDef,
    ListChangeSetsOutputTypeDef,
    ListExportsInputRequestTypeDef,
    ListExportsOutputTypeDef,
    ListImportsInputRequestTypeDef,
    ListImportsOutputTypeDef,
    ListStackInstancesInputRequestTypeDef,
    ListStackInstancesOutputTypeDef,
    ListStackResourcesInputRequestTypeDef,
    ListStackResourcesOutputTypeDef,
    ListStackSetOperationResultsInputRequestTypeDef,
    ListStackSetOperationResultsOutputTypeDef,
    ListStackSetOperationsInputRequestTypeDef,
    ListStackSetOperationsOutputTypeDef,
    ListStackSetsInputRequestTypeDef,
    ListStackSetsOutputTypeDef,
    ListStacksInputRequestTypeDef,
    ListStacksOutputTypeDef,
    ListTypeRegistrationsInputRequestTypeDef,
    ListTypeRegistrationsOutputTypeDef,
    ListTypeVersionsInputRequestTypeDef,
    ListTypeVersionsOutputTypeDef,
    ListTypesInputRequestTypeDef,
    ListTypesOutputTypeDef,
    LoggingConfigTypeDef,
    ModuleInfoTypeDef,
    OutputTypeDef,
    PaginatorConfigTypeDef,
    ParameterConstraintsTypeDef,
    ParameterDeclarationTypeDef,
    ParameterTypeDef,
    PhysicalResourceIdContextKeyValuePairTypeDef,
    PropertyDifferenceTypeDef,
    PublishTypeInputRequestTypeDef,
    PublishTypeOutputTypeDef,
    RecordHandlerProgressInputRequestTypeDef,
    RegisterPublisherInputRequestTypeDef,
    RegisterPublisherOutputTypeDef,
    RegisterTypeInputRequestTypeDef,
    RegisterTypeOutputTypeDef,
    RequiredActivatedTypeTypeDef,
    ResourceChangeDetailTypeDef,
    ResourceChangeTypeDef,
    ResourceIdentifierSummaryTypeDef,
    ResourceTargetDefinitionTypeDef,
    ResourceToImportTypeDef,
    ResponseMetadataTypeDef,
    RollbackConfigurationTypeDef,
    RollbackStackInputRequestTypeDef,
    RollbackStackOutputTypeDef,
    RollbackTriggerTypeDef,
    ServiceResourceEventRequestTypeDef,
    ServiceResourceStackRequestTypeDef,
    ServiceResourceStackResourceRequestTypeDef,
    ServiceResourceStackResourceSummaryRequestTypeDef,
    SetStackPolicyInputRequestTypeDef,
    SetTypeConfigurationInputRequestTypeDef,
    SetTypeConfigurationOutputTypeDef,
    SetTypeDefaultVersionInputRequestTypeDef,
    SignalResourceInputRequestTypeDef,
    StackDriftInformationSummaryTypeDef,
    StackDriftInformationTypeDef,
    StackEventTypeDef,
    StackInstanceComprehensiveStatusTypeDef,
    StackInstanceFilterTypeDef,
    StackInstanceSummaryTypeDef,
    StackInstanceTypeDef,
    StackResourceDetailTypeDef,
    StackResourceDriftInformationSummaryTypeDef,
    StackResourceDriftInformationTypeDef,
    StackResourceDriftTypeDef,
    StackResourceRequestTypeDef,
    StackResourceSummaryTypeDef,
    StackResourceTypeDef,
    StackSetDriftDetectionDetailsTypeDef,
    StackSetOperationPreferencesTypeDef,
    StackSetOperationResultSummaryTypeDef,
    StackSetOperationSummaryTypeDef,
    StackSetOperationTypeDef,
    StackSetSummaryTypeDef,
    StackSetTypeDef,
    StackSummaryTypeDef,
    StackTypeDef,
    StopStackSetOperationInputRequestTypeDef,
    TagTypeDef,
    TemplateParameterTypeDef,
    TestTypeInputRequestTypeDef,
    TestTypeOutputTypeDef,
    TypeConfigurationDetailsTypeDef,
    TypeConfigurationIdentifierTypeDef,
    TypeFiltersTypeDef,
    TypeSummaryTypeDef,
    TypeVersionSummaryTypeDef,
    UpdateStackInputRequestTypeDef,
    UpdateStackInputStackTypeDef,
    UpdateStackInstancesInputRequestTypeDef,
    UpdateStackInstancesOutputTypeDef,
    UpdateStackOutputTypeDef,
    UpdateStackSetInputRequestTypeDef,
    UpdateStackSetOutputTypeDef,
    UpdateTerminationProtectionInputRequestTypeDef,
    UpdateTerminationProtectionOutputTypeDef,
    ValidateTemplateInputRequestTypeDef,
    ValidateTemplateOutputTypeDef,
    WaiterConfigTypeDef,
)

def get_structure() -> AccountGateResultTypeDef:
    return {
      ...
    }
```

<a id="versioning"></a>

## Versioning

`mypy-boto3-cloudformation` version is the same as related `boto3` version and
follows [PEP 440](https://www.python.org/dev/peps/pep-0440/) format.

<a id="documentation"></a>

## Documentation

All type annotations can be found in
[mypy-boto3-cloudformation docs](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_cloudformation/)

<a id="support-and-contributing"></a>

## Support and contributing

This package is auto-generated. Please reports any bugs or request new features
in [mypy-boto3-builder](https://github.com/vemel/mypy_boto3_builder/issues/)
repository.
