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
# ControlTowerClient 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.
# Exceptions.exceptions usage example
client = boto3.client("controltower")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.InternalServerException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ThrottlingException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions 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
# can_paginate 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
# close 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
# disable_control method definition
def disable_control(
self,
*,
controlIdentifier: str,
targetIdentifier: str,
) -> DisableControlOutputTypeDef: # (1)
...
# disable_control method usage example with argument unpacking
kwargs: DisableControlInputRequestTypeDef = { # (1)
"controlIdentifier": ...,
"targetIdentifier": ...,
}
parent.disable_control(**kwargs)
enable_control#
This API call activates a control.
Type annotations and code completion for boto3.client("controltower").enable_control
method.
boto3 documentation
# enable_control method definition
def enable_control(
self,
*,
controlIdentifier: str,
targetIdentifier: str,
) -> EnableControlOutputTypeDef: # (1)
...
# enable_control method usage example with argument unpacking
kwargs: EnableControlInputRequestTypeDef = { # (1)
"controlIdentifier": ...,
"targetIdentifier": ...,
}
parent.enable_control(**kwargs)
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
# generate_presigned_url 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
# get_control_operation method definition
def get_control_operation(
self,
*,
operationIdentifier: str,
) -> GetControlOperationOutputTypeDef: # (1)
...
# get_control_operation method usage example with argument unpacking
kwargs: GetControlOperationInputRequestTypeDef = { # (1)
"operationIdentifier": ...,
}
parent.get_control_operation(**kwargs)
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
# list_enabled_controls method definition
def list_enabled_controls(
self,
*,
targetIdentifier: str,
maxResults: int = ...,
nextToken: str = ...,
) -> ListEnabledControlsOutputTypeDef: # (1)
...
# list_enabled_controls method usage example with argument unpacking
kwargs: ListEnabledControlsInputRequestTypeDef = { # (1)
"targetIdentifier": ...,
}
parent.list_enabled_controls(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("controltower").get_paginator
method with overloads.
client.get_paginator("list_enabled_controls")
-> ListEnabledControlsPaginator