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

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("...").

Usage example
from boto3.session import Session

from mypy_boto3_controltower.paginator import ListEnabledControlsPaginator

def get_list_enabled_controls_paginator() -> ListEnabledControlsPaginator:
    return Session().client("controltower").get_paginator("list_enabled_controls"))

Literals

Type annotations for literals used in methods and schemas.

Usage example
from mypy_boto3_controltower.literals import ControlOperationStatusType

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

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

Usage example
from mypy_boto3_controltower.type_defs import ControlOperationTypeDef

def get_value() -> ControlOperationTypeDef:
    return {
        "endTime": ...,
    }