CloudTrailDataServiceClient#
Index > CloudTrailDataService > CloudTrailDataServiceClient
Auto-generated documentation for CloudTrailDataService type annotations stubs module mypy-boto3-cloudtrail-data.
CloudTrailDataServiceClient#
Type annotations and code completion for boto3.client("cloudtrail-data")
.
boto3 documentation
# CloudTrailDataServiceClient usage example
from boto3.session import Session
from mypy_boto3_cloudtrail_data.client import CloudTrailDataServiceClient
def get_cloudtrail-data_client() -> CloudTrailDataServiceClient:
return Session().client("cloudtrail-data")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("cloudtrail-data").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("cloudtrail-data")
try:
do_something(client)
except (
client.exceptions.ChannelInsufficientPermission,
client.exceptions.ChannelNotFound,
client.exceptions.ChannelUnsupportedSchema,
client.exceptions.ClientError,
client.exceptions.DuplicatedAuditEventId,
client.exceptions.InvalidChannelARN,
client.exceptions.UnsupportedOperationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_cloudtrail_data.client import Exceptions
def handle_error(exc: Exceptions.ChannelInsufficientPermission) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("cloudtrail-data").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("cloudtrail-data").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:
...
put_audit_events#
Ingests your application events into CloudTrail Lake.
Type annotations and code completion for boto3.client("cloudtrail-data").put_audit_events
method.
boto3 documentation
# put_audit_events method definition
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)