CloudTrailDataServiceClient#
Index > CloudTrailDataService > CloudTrailDataServiceClient
Auto-generated documentation for CloudTrailDataService type annotations stubs module types-aiobotocore-cloudtrail-data.
CloudTrailDataServiceClient#
Type annotations and code completion for session.create_client("cloudtrail-data")
boto3 documentation
CloudTrailDataServiceClient usage example
from aiobotocore.session import get_session
from types_aiobotocore_cloudtrail_data.client import CloudTrailDataServiceClient
session = get_session()
async with session.create_client("cloudtrail-data") as client:
client: CloudTrailDataServiceClient
Exceptions#
aiobotocore
client exceptions are generated in runtime.
This class provides code completion for session.create_client("cloudtrail-data").exceptions
structure.
CloudTrailDataServiceClient.exceptions usage example
async with session.create_client("cloudtrail-data") as client:
try:
do_something(client)
except (
client.ChannelInsufficientPermission,
client.ChannelNotFound,
client.ChannelUnsupportedSchema,
client.ClientError,
client.DuplicatedAuditEventId,
client.InvalidChannelARN,
client.UnsupportedOperationException,
) as e:
print(e)
CloudTrailDataServiceClient usage type checking example
from types_aiobotocore_cloudtrail_data.client import Exceptions
def handle_error(exc: Exceptions.ChannelInsufficientPermission) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for session.create_client("cloudtrail-data").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("cloudtrail-data").close
method.
boto3 documentation
# close method definition
await def close(
self,
) -> None:
...
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.create_client("cloudtrail-data").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:
...
put_audit_events#
Ingests your application events into CloudTrail Lake.
Type annotations and code completion for session.create_client("cloudtrail-data").put_audit_events
method.
boto3 documentation
# put_audit_events method definition
await def put_audit_events(
self,
*,
auditEvents: Sequence[AuditEventTypeDef], # (1)
channelArn: str,
externalId: str = ...,
) -> PutAuditEventsResponseTypeDef: # (2)
...
# put_audit_events method usage example with argument unpacking
kwargs: PutAuditEventsRequestRequestTypeDef = { # (1)
"auditEvents": ...,
"channelArn": ...,
}
parent.put_audit_events(**kwargs)
__aenter__#
Type annotations and code completion for session.create_client("cloudtrail-data").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> CloudTrailDataServiceClient:
...
__aexit__#
Type annotations and code completion for session.create_client("cloudtrail-data").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Any,
exc_val: Any,
exc_tb: Any,
) -> Any:
...