Skip to content

ControlTowerClient#

Index > ControlTower > ControlTowerClient

Auto-generated documentation for ControlTower type annotations stubs module types-aiobotocore-controltower.

ControlTowerClient#

Type annotations and code completion for session.create_client("controltower") boto3 documentation

ControlTowerClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_controltower.client import ControlTowerClient

session = get_session()
async with session.create_client("controltower") as client:
    client: ControlTowerClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("controltower").exceptions structure.

ControlTowerClient.exceptions usage example

async with session.create_client("controltower") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
ControlTowerClient usage type checking example

from types_aiobotocore_controltower.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("controltower").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("controltower").close method. boto3 documentation

# close method definition

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

disable_control#

This API call turns off a control.

Type annotations and code completion for session.create_client("controltower").disable_control method. boto3 documentation

# disable_control method definition

await def disable_control(
    self,
    *,
    controlIdentifier: str,
    targetIdentifier: str,
) -> DisableControlOutputTypeDef:  # (1)
    ...
  1. See DisableControlOutputTypeDef
# disable_control method usage example with argument unpacking

kwargs: DisableControlInputRequestTypeDef = {  # (1)
    "controlIdentifier": ...,
    "targetIdentifier": ...,
}

parent.disable_control(**kwargs)
  1. See DisableControlInputRequestTypeDef

enable_control#

This API call activates a control.

Type annotations and code completion for session.create_client("controltower").enable_control method. boto3 documentation

# enable_control method definition

await def enable_control(
    self,
    *,
    controlIdentifier: str,
    targetIdentifier: str,
) -> EnableControlOutputTypeDef:  # (1)
    ...
  1. See EnableControlOutputTypeDef
# enable_control method usage example with argument unpacking

kwargs: EnableControlInputRequestTypeDef = {  # (1)
    "controlIdentifier": ...,
    "targetIdentifier": ...,
}

parent.enable_control(**kwargs)
  1. See EnableControlInputRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("controltower").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_control_operation#

Returns the status of a particular EnableControl or DisableControl operation.

Type annotations and code completion for session.create_client("controltower").get_control_operation method. boto3 documentation

# get_control_operation method definition

await def get_control_operation(
    self,
    *,
    operationIdentifier: str,
) -> GetControlOperationOutputTypeDef:  # (1)
    ...
  1. See GetControlOperationOutputTypeDef
# get_control_operation method usage example with argument unpacking

kwargs: GetControlOperationInputRequestTypeDef = {  # (1)
    "operationIdentifier": ...,
}

parent.get_control_operation(**kwargs)
  1. See GetControlOperationInputRequestTypeDef

list_enabled_controls#

Lists the controls enabled by AWS Control Tower on the specified organizational unit and the accounts it contains.

Type annotations and code completion for session.create_client("controltower").list_enabled_controls method. boto3 documentation

# list_enabled_controls method definition

await def list_enabled_controls(
    self,
    *,
    targetIdentifier: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListEnabledControlsOutputTypeDef:  # (1)
    ...
  1. See ListEnabledControlsOutputTypeDef
# list_enabled_controls method usage example with argument unpacking

kwargs: ListEnabledControlsInputRequestTypeDef = {  # (1)
    "targetIdentifier": ...,
}

parent.list_enabled_controls(**kwargs)
  1. See ListEnabledControlsInputRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("controltower").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> ControlTowerClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("controltower").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("controltower").get_paginator method with overloads.