Skip to content

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

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.

Usage example
client = boto3.client("cloudtrail-data")

try:
    do_something(client)
except (
    client.ChannelInsufficientPermission,
    client.ChannelNotFound,
    client.ChannelUnsupportedSchema,
    client.ClientError,
    client.DuplicatedAuditEventId,
    client.InvalidChannelARN,
    client.UnsupportedOperationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_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 boto3.client("cloudtrail-data").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("cloudtrail-data").close method. boto3 documentation

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

generate_presigned_url

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

Type annotations and code completion for boto3.client("cloudtrail-data").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:
    ...

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

Method definition
def put_audit_events(
    self,
    *,
    auditEvents: Sequence[AuditEventTypeDef],  # (1)
    channelArn: str,
    externalId: str = ...,
) -> PutAuditEventsResponseTypeDef:  # (2)
    ...
  1. See AuditEventTypeDef
  2. See PutAuditEventsResponseTypeDef
Usage example with kwargs
kwargs: PutAuditEventsRequestRequestTypeDef = {  # (1)
    "auditEvents": ...,
    "channelArn": ...,
}

parent.put_audit_events(**kwargs)
  1. See PutAuditEventsRequestRequestTypeDef