Skip to content

ControlTowerClient

Index > ControlTower > ControlTowerClient

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

ControlTowerClient

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

Usage example
from boto3.session import Session
from mypy_boto3_controltower.client import ControlTowerClient

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

Exceptions

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

Usage example
client = boto3.client("controltower")

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)
Type checking example
from mypy_boto3_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 boto3.client("controltower").can_paginate method. boto3 documentation

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

close

Closes underlying endpoint connections.

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

Method definition
def close(
    self,
) -> None:
    ...

disable_control

This API call turns off a control.

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

Method definition
def disable_control(
    self,
    *,
    controlIdentifier: str,
    targetIdentifier: str,
) -> DisableControlOutputTypeDef:  # (1)
    ...
  1. See DisableControlOutputTypeDef
Usage example with kwargs
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 boto3.client("controltower").enable_control method. boto3 documentation

Method definition
def enable_control(
    self,
    *,
    controlIdentifier: str,
    targetIdentifier: str,
) -> EnableControlOutputTypeDef:  # (1)
    ...
  1. See EnableControlOutputTypeDef
Usage example with kwargs
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 boto3.client("controltower").generate_presigned_url method. boto3 documentation

Method definition
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 boto3.client("controltower").get_control_operation method. boto3 documentation

Method definition
def get_control_operation(
    self,
    *,
    operationIdentifier: str,
) -> GetControlOperationOutputTypeDef:  # (1)
    ...
  1. See GetControlOperationOutputTypeDef
Usage example with kwargs
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 boto3.client("controltower").list_enabled_controls method. boto3 documentation

Method definition
def list_enabled_controls(
    self,
    *,
    targetIdentifier: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListEnabledControlsOutputTypeDef:  # (1)
    ...
  1. See ListEnabledControlsOutputTypeDef
Usage example with kwargs
kwargs: ListEnabledControlsInputRequestTypeDef = {  # (1)
    "targetIdentifier": ...,
}

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

get_paginator

Type annotations and code completion for boto3.client("controltower").get_paginator method with overloads.