Skip to content

Type definitions#

Index > CloudTrail > Type definitions

Auto-generated documentation for CloudTrail type annotations stubs module mypy-boto3-cloudtrail.

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: str,
    Value: NotRequired[str],

AdvancedFieldSelectorTypeDef#

# AdvancedFieldSelectorTypeDef definition

class AdvancedFieldSelectorTypeDef(TypedDict):
    Field: str,
    Equals: NotRequired[Sequence[str]],
    StartsWith: NotRequired[Sequence[str]],
    EndsWith: NotRequired[Sequence[str]],
    NotEquals: NotRequired[Sequence[str]],
    NotStartsWith: NotRequired[Sequence[str]],
    NotEndsWith: NotRequired[Sequence[str]],

CancelQueryRequestRequestTypeDef#

# CancelQueryRequestRequestTypeDef definition

class CancelQueryRequestRequestTypeDef(TypedDict):
    QueryId: str,
    EventDataStore: NotRequired[str],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

ChannelTypeDef#

# ChannelTypeDef definition

class ChannelTypeDef(TypedDict):
    ChannelArn: NotRequired[str],
    Name: NotRequired[str],

DestinationTypeDef#

# DestinationTypeDef definition

class DestinationTypeDef(TypedDict):
    Type: DestinationTypeType,  # (1)
    Location: str,
  1. See DestinationTypeType

DataResourceTypeDef#

# DataResourceTypeDef definition

class DataResourceTypeDef(TypedDict):
    Type: NotRequired[str],
    Values: NotRequired[List[str]],

DeleteChannelRequestRequestTypeDef#

# DeleteChannelRequestRequestTypeDef definition

class DeleteChannelRequestRequestTypeDef(TypedDict):
    Channel: str,

DeleteEventDataStoreRequestRequestTypeDef#

# DeleteEventDataStoreRequestRequestTypeDef definition

class DeleteEventDataStoreRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

DeleteResourcePolicyRequestRequestTypeDef#

# DeleteResourcePolicyRequestRequestTypeDef definition

class DeleteResourcePolicyRequestRequestTypeDef(TypedDict):
    ResourceArn: str,

DeleteTrailRequestRequestTypeDef#

# DeleteTrailRequestRequestTypeDef definition

class DeleteTrailRequestRequestTypeDef(TypedDict):
    Name: str,

DeregisterOrganizationDelegatedAdminRequestRequestTypeDef#

# DeregisterOrganizationDelegatedAdminRequestRequestTypeDef definition

class DeregisterOrganizationDelegatedAdminRequestRequestTypeDef(TypedDict):
    DelegatedAdminAccountId: str,

DescribeQueryRequestRequestTypeDef#

# DescribeQueryRequestRequestTypeDef definition

class DescribeQueryRequestRequestTypeDef(TypedDict):
    EventDataStore: NotRequired[str],
    QueryId: NotRequired[str],
    QueryAlias: NotRequired[str],

QueryStatisticsForDescribeQueryTypeDef#

# QueryStatisticsForDescribeQueryTypeDef definition

class QueryStatisticsForDescribeQueryTypeDef(TypedDict):
    EventsMatched: NotRequired[int],
    EventsScanned: NotRequired[int],
    BytesScanned: NotRequired[int],
    ExecutionTimeInMillis: NotRequired[int],
    CreationTime: NotRequired[datetime],

DescribeTrailsRequestRequestTypeDef#

# DescribeTrailsRequestRequestTypeDef definition

class DescribeTrailsRequestRequestTypeDef(TypedDict):
    trailNameList: NotRequired[Sequence[str]],
    includeShadowTrails: NotRequired[bool],

TrailTypeDef#

# TrailTypeDef definition

class TrailTypeDef(TypedDict):
    Name: NotRequired[str],
    S3BucketName: NotRequired[str],
    S3KeyPrefix: NotRequired[str],
    SnsTopicName: NotRequired[str],
    SnsTopicARN: NotRequired[str],
    IncludeGlobalServiceEvents: NotRequired[bool],
    IsMultiRegionTrail: NotRequired[bool],
    HomeRegion: NotRequired[str],
    TrailARN: NotRequired[str],
    LogFileValidationEnabled: NotRequired[bool],
    CloudWatchLogsLogGroupArn: NotRequired[str],
    CloudWatchLogsRoleArn: NotRequired[str],
    KmsKeyId: NotRequired[str],
    HasCustomEventSelectors: NotRequired[bool],
    HasInsightSelectors: NotRequired[bool],
    IsOrganizationTrail: NotRequired[bool],

DisableFederationRequestRequestTypeDef#

# DisableFederationRequestRequestTypeDef definition

class DisableFederationRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

EnableFederationRequestRequestTypeDef#

# EnableFederationRequestRequestTypeDef definition

class EnableFederationRequestRequestTypeDef(TypedDict):
    EventDataStore: str,
    FederationRoleArn: str,

ResourceTypeDef#

# ResourceTypeDef definition

class ResourceTypeDef(TypedDict):
    ResourceType: NotRequired[str],
    ResourceName: NotRequired[str],

GetChannelRequestRequestTypeDef#

# GetChannelRequestRequestTypeDef definition

class GetChannelRequestRequestTypeDef(TypedDict):
    Channel: str,

IngestionStatusTypeDef#

# IngestionStatusTypeDef definition

class IngestionStatusTypeDef(TypedDict):
    LatestIngestionSuccessTime: NotRequired[datetime],
    LatestIngestionSuccessEventID: NotRequired[str],
    LatestIngestionErrorCode: NotRequired[str],
    LatestIngestionAttemptTime: NotRequired[datetime],
    LatestIngestionAttemptEventID: NotRequired[str],

GetEventDataStoreRequestRequestTypeDef#

# GetEventDataStoreRequestRequestTypeDef definition

class GetEventDataStoreRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

GetEventSelectorsRequestRequestTypeDef#

# GetEventSelectorsRequestRequestTypeDef definition

class GetEventSelectorsRequestRequestTypeDef(TypedDict):
    TrailName: str,

GetImportRequestRequestTypeDef#

# GetImportRequestRequestTypeDef definition

class GetImportRequestRequestTypeDef(TypedDict):
    ImportId: str,

ImportStatisticsTypeDef#

# ImportStatisticsTypeDef definition

class ImportStatisticsTypeDef(TypedDict):
    PrefixesFound: NotRequired[int],
    PrefixesCompleted: NotRequired[int],
    FilesCompleted: NotRequired[int],
    EventsCompleted: NotRequired[int],
    FailedEntries: NotRequired[int],

GetInsightSelectorsRequestRequestTypeDef#

# GetInsightSelectorsRequestRequestTypeDef definition

class GetInsightSelectorsRequestRequestTypeDef(TypedDict):
    TrailName: NotRequired[str],
    EventDataStore: NotRequired[str],

InsightSelectorTypeDef#

# InsightSelectorTypeDef definition

class InsightSelectorTypeDef(TypedDict):
    InsightType: NotRequired[InsightTypeType],  # (1)
  1. See InsightTypeType

GetQueryResultsRequestRequestTypeDef#

# GetQueryResultsRequestRequestTypeDef definition

class GetQueryResultsRequestRequestTypeDef(TypedDict):
    QueryId: str,
    EventDataStore: NotRequired[str],
    NextToken: NotRequired[str],
    MaxQueryResults: NotRequired[int],

QueryStatisticsTypeDef#

# QueryStatisticsTypeDef definition

class QueryStatisticsTypeDef(TypedDict):
    ResultsCount: NotRequired[int],
    TotalResultsCount: NotRequired[int],
    BytesScanned: NotRequired[int],

GetResourcePolicyRequestRequestTypeDef#

# GetResourcePolicyRequestRequestTypeDef definition

class GetResourcePolicyRequestRequestTypeDef(TypedDict):
    ResourceArn: str,

GetTrailRequestRequestTypeDef#

# GetTrailRequestRequestTypeDef definition

class GetTrailRequestRequestTypeDef(TypedDict):
    Name: str,

GetTrailStatusRequestRequestTypeDef#

# GetTrailStatusRequestRequestTypeDef definition

class GetTrailStatusRequestRequestTypeDef(TypedDict):
    Name: str,

ImportFailureListItemTypeDef#

# ImportFailureListItemTypeDef definition

class ImportFailureListItemTypeDef(TypedDict):
    Location: NotRequired[str],
    Status: NotRequired[ImportFailureStatusType],  # (1)
    ErrorType: NotRequired[str],
    ErrorMessage: NotRequired[str],
    LastUpdatedTime: NotRequired[datetime],
  1. See ImportFailureStatusType

S3ImportSourceTypeDef#

# S3ImportSourceTypeDef definition

class S3ImportSourceTypeDef(TypedDict):
    S3LocationUri: str,
    S3BucketRegion: str,
    S3BucketAccessRoleArn: str,

ImportsListItemTypeDef#

# ImportsListItemTypeDef definition

class ImportsListItemTypeDef(TypedDict):
    ImportId: NotRequired[str],
    ImportStatus: NotRequired[ImportStatusType],  # (1)
    Destinations: NotRequired[List[str]],
    CreatedTimestamp: NotRequired[datetime],
    UpdatedTimestamp: NotRequired[datetime],
  1. See ImportStatusType

ListChannelsRequestRequestTypeDef#

# ListChannelsRequestRequestTypeDef definition

class ListChannelsRequestRequestTypeDef(TypedDict):
    MaxResults: NotRequired[int],
    NextToken: NotRequired[str],

ListEventDataStoresRequestRequestTypeDef#

# ListEventDataStoresRequestRequestTypeDef definition

class ListEventDataStoresRequestRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

ListImportFailuresRequestRequestTypeDef#

# ListImportFailuresRequestRequestTypeDef definition

class ListImportFailuresRequestRequestTypeDef(TypedDict):
    ImportId: str,
    MaxResults: NotRequired[int],
    NextToken: NotRequired[str],

ListImportsRequestRequestTypeDef#

# ListImportsRequestRequestTypeDef definition

class ListImportsRequestRequestTypeDef(TypedDict):
    MaxResults: NotRequired[int],
    Destination: NotRequired[str],
    ImportStatus: NotRequired[ImportStatusType],  # (1)
    NextToken: NotRequired[str],
  1. See ImportStatusType

PublicKeyTypeDef#

# PublicKeyTypeDef definition

class PublicKeyTypeDef(TypedDict):
    Value: NotRequired[bytes],
    ValidityStartTime: NotRequired[datetime],
    ValidityEndTime: NotRequired[datetime],
    Fingerprint: NotRequired[str],

QueryTypeDef#

# QueryTypeDef definition

class QueryTypeDef(TypedDict):
    QueryId: NotRequired[str],
    QueryStatus: NotRequired[QueryStatusType],  # (1)
    CreationTime: NotRequired[datetime],
  1. See QueryStatusType

ListTagsRequestRequestTypeDef#

# ListTagsRequestRequestTypeDef definition

class ListTagsRequestRequestTypeDef(TypedDict):
    ResourceIdList: Sequence[str],
    NextToken: NotRequired[str],

ListTrailsRequestRequestTypeDef#

# ListTrailsRequestRequestTypeDef definition

class ListTrailsRequestRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],

TrailInfoTypeDef#

# TrailInfoTypeDef definition

class TrailInfoTypeDef(TypedDict):
    TrailARN: NotRequired[str],
    Name: NotRequired[str],
    HomeRegion: NotRequired[str],

LookupAttributeTypeDef#

# LookupAttributeTypeDef definition

class LookupAttributeTypeDef(TypedDict):
    AttributeKey: LookupAttributeKeyType,  # (1)
    AttributeValue: str,
  1. See LookupAttributeKeyType

PutResourcePolicyRequestRequestTypeDef#

# PutResourcePolicyRequestRequestTypeDef definition

class PutResourcePolicyRequestRequestTypeDef(TypedDict):
    ResourceArn: str,
    ResourcePolicy: str,

RegisterOrganizationDelegatedAdminRequestRequestTypeDef#

# RegisterOrganizationDelegatedAdminRequestRequestTypeDef definition

class RegisterOrganizationDelegatedAdminRequestRequestTypeDef(TypedDict):
    MemberAccountId: str,

RestoreEventDataStoreRequestRequestTypeDef#

# RestoreEventDataStoreRequestRequestTypeDef definition

class RestoreEventDataStoreRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

StartEventDataStoreIngestionRequestRequestTypeDef#

# StartEventDataStoreIngestionRequestRequestTypeDef definition

class StartEventDataStoreIngestionRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

StartLoggingRequestRequestTypeDef#

# StartLoggingRequestRequestTypeDef definition

class StartLoggingRequestRequestTypeDef(TypedDict):
    Name: str,

StartQueryRequestRequestTypeDef#

# StartQueryRequestRequestTypeDef definition

class StartQueryRequestRequestTypeDef(TypedDict):
    QueryStatement: NotRequired[str],
    DeliveryS3Uri: NotRequired[str],
    QueryAlias: NotRequired[str],
    QueryParameters: NotRequired[Sequence[str]],

StopEventDataStoreIngestionRequestRequestTypeDef#

# StopEventDataStoreIngestionRequestRequestTypeDef definition

class StopEventDataStoreIngestionRequestRequestTypeDef(TypedDict):
    EventDataStore: str,

StopImportRequestRequestTypeDef#

# StopImportRequestRequestTypeDef definition

class StopImportRequestRequestTypeDef(TypedDict):
    ImportId: str,

StopLoggingRequestRequestTypeDef#

# StopLoggingRequestRequestTypeDef definition

class StopLoggingRequestRequestTypeDef(TypedDict):
    Name: str,

UpdateTrailRequestRequestTypeDef#

# UpdateTrailRequestRequestTypeDef definition

class UpdateTrailRequestRequestTypeDef(TypedDict):
    Name: str,
    S3BucketName: NotRequired[str],
    S3KeyPrefix: NotRequired[str],
    SnsTopicName: NotRequired[str],
    IncludeGlobalServiceEvents: NotRequired[bool],
    IsMultiRegionTrail: NotRequired[bool],
    EnableLogFileValidation: NotRequired[bool],
    CloudWatchLogsLogGroupArn: NotRequired[str],
    CloudWatchLogsRoleArn: NotRequired[str],
    KmsKeyId: NotRequired[str],
    IsOrganizationTrail: NotRequired[bool],

AddTagsRequestRequestTypeDef#

# AddTagsRequestRequestTypeDef definition

class AddTagsRequestRequestTypeDef(TypedDict):
    ResourceId: str,
    TagsList: Sequence[TagTypeDef],  # (1)
  1. See TagTypeDef

CreateTrailRequestRequestTypeDef#

# CreateTrailRequestRequestTypeDef definition

class CreateTrailRequestRequestTypeDef(TypedDict):
    Name: str,
    S3BucketName: str,
    S3KeyPrefix: NotRequired[str],
    SnsTopicName: NotRequired[str],
    IncludeGlobalServiceEvents: NotRequired[bool],
    IsMultiRegionTrail: NotRequired[bool],
    EnableLogFileValidation: NotRequired[bool],
    CloudWatchLogsLogGroupArn: NotRequired[str],
    CloudWatchLogsRoleArn: NotRequired[str],
    KmsKeyId: NotRequired[str],
    IsOrganizationTrail: NotRequired[bool],
    TagsList: NotRequired[Sequence[TagTypeDef]],  # (1)
  1. See TagTypeDef

RemoveTagsRequestRequestTypeDef#

# RemoveTagsRequestRequestTypeDef definition

class RemoveTagsRequestRequestTypeDef(TypedDict):
    ResourceId: str,
    TagsList: Sequence[TagTypeDef],  # (1)
  1. See