Skip to content

ControlTower module#

Index > ControlTower

Auto-generated documentation for ControlTower type annotations stubs module mypy-boto3-controltower.

How to install#

VSCode extension#

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and ControlTower.

From PyPI with pip#

Install boto3-stubs for ControlTower service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[controltower]'


# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[controltower]'


# standalone installation
python -m pip install mypy-boto3-controltower

How to uninstall#

python -m pip uninstall -y mypy-boto3-controltower

Usage#

Code samples can be found in Examples.

ControlTowerClient#

Type annotations and code completion for boto3.client("controltower") as ControlTowerClient boto3 documentation

# ControlTowerClient usage example

from boto3.session import Session

from mypy_boto3_controltower.client import ControlTowerClient

def get_client() -> ControlTowerClient:
    return Session().client("controltower")

Paginators#

Type annotations and code completion for paginators from boto3.client("controltower").get_paginator("...").

# ListBaselinesPaginator usage example

from boto3.session import Session

from mypy_boto3_controltower.paginator import ListBaselinesPaginator

def get_list_baselines_paginator() -> ListBaselinesPaginator:
    return Session().client("controltower").get_paginator("list_baselines"))

Literals#

Type annotations for literals used in methods and schema.

# BaselineOperationStatusType usage example

from mypy_boto3_controltower.literals import BaselineOperationStatusType

def get_value() -> BaselineOperationStatusType:
    return "FAILED"

Type definitions#

Type annotations for type definitions used in methods and schema.