CloudTrailClient#
Index > CloudTrail > CloudTrailClient
Auto-generated documentation for CloudTrail type annotations stubs module mypy-boto3-cloudtrail.
CloudTrailClient#
Type annotations and code completion for boto3.client("cloudtrail")
.
boto3 documentation
# CloudTrailClient usage example
from boto3.session import Session
from mypy_boto3_cloudtrail.client import CloudTrailClient
def get_cloudtrail_client() -> CloudTrailClient:
return Session().client("cloudtrail")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("cloudtrail").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("cloudtrail")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.AccountHasOngoingImportException,
client.exceptions.AccountNotFoundException,
client.exceptions.AccountNotRegisteredException,
client.exceptions.AccountRegisteredException,
client.exceptions.CannotDelegateManagementAccountException,
client.exceptions.ChannelARNInvalidException,
client.exceptions.ChannelAlreadyExistsException,
client.exceptions.ChannelExistsForEDSException,
client.exceptions.ChannelMaxLimitExceededException,
client.exceptions.ChannelNotFoundException,
client.exceptions.ClientError,
client.exceptions.CloudTrailARNInvalidException,
client.exceptions.CloudTrailAccessNotEnabledException,
client.exceptions.CloudTrailInvalidClientTokenIdException,
client.exceptions.CloudWatchLogsDeliveryUnavailableException,
client.exceptions.ConcurrentModificationException,
client.exceptions.ConflictException,
client.exceptions.DelegatedAdminAccountLimitExceededException,
client.exceptions.EventDataStoreARNInvalidException,
client.exceptions.EventDataStoreAlreadyExistsException,
client.exceptions.EventDataStoreFederationEnabledException,
client.exceptions.EventDataStoreHasOngoingImportException,
client.exceptions.EventDataStoreMaxLimitExceededException,
client.exceptions.EventDataStoreNotFoundException,
client.exceptions.EventDataStoreTerminationProtectedException,
client.exceptions.GenerateResponseException,
client.exceptions.ImportNotFoundException,
client.exceptions.InactiveEventDataStoreException,
client.exceptions.InactiveQueryException,
client.exceptions.InsightNotEnabledException,
client.exceptions.InsufficientDependencyServiceAccessPermissionException,
client.exceptions.InsufficientEncryptionPolicyException,
client.exceptions.InsufficientS3BucketPolicyException,
client.exceptions.InsufficientSnsTopicPolicyException,
client.exceptions.InvalidCloudWatchLogsLogGroupArnException,
client.exceptions.InvalidCloudWatchLogsRoleArnException,
client.exceptions.InvalidDateRangeException,
client.exceptions.InvalidEventCategoryException,
client.exceptions.InvalidEventDataStoreCategoryException,
client.exceptions.InvalidEventDataStoreStatusException,
client.exceptions.InvalidEventSelectorsException,
client.exceptions.InvalidHomeRegionException,
client.exceptions.InvalidImportSourceException,
client.exceptions.InvalidInsightSelectorsException,
client.exceptions.InvalidKmsKeyIdException,
client.exceptions.InvalidLookupAttributesException,
client.exceptions.InvalidMaxResultsException,
client.exceptions.InvalidNextTokenException,
client.exceptions.InvalidParameterCombinationException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidQueryStatementException,
client.exceptions.InvalidQueryStatusException,
client.exceptions.InvalidS3BucketNameException,
client.exceptions.InvalidS3PrefixException,
client.exceptions.InvalidSnsTopicNameException,
client.exceptions.InvalidSourceException,
client.exceptions.InvalidTagParameterException,
client.exceptions.InvalidTimeRangeException,
client.exceptions.InvalidTokenException,
client.exceptions.InvalidTrailNameException,
client.exceptions.KmsException,
client.exceptions.KmsKeyDisabledException,
client.exceptions.KmsKeyNotFoundException,
client.exceptions.MaxConcurrentQueriesException,
client.exceptions.MaximumNumberOfTrailsExceededException,
client.exceptions.NoManagementAccountSLRExistsException,
client.exceptions.NotOrganizationManagementAccountException,
client.exceptions.NotOrganizationMasterAccountException,
client.exceptions.OperationNotPermittedException,
client.exceptions.OrganizationNotInAllFeaturesModeException,
client.exceptions.OrganizationsNotInUseException,
client.exceptions.QueryIdNotFoundException,
client.exceptions.ResourceARNNotValidException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ResourcePolicyNotFoundException,
client.exceptions.ResourcePolicyNotValidException,
client.exceptions.ResourceTypeNotSupportedException,
client.exceptions.S3BucketDoesNotExistException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.TagsLimitExceededException,
client.exceptions.ThrottlingException,
client.exceptions.TrailAlreadyExistsException,
client.exceptions.TrailNotFoundException,
client.exceptions.TrailNotProvidedException,
client.exceptions.UnsupportedOperationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_cloudtrail.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("cloudtrail").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").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:
...
add_tags#
Adds one or more tags to a trail, event data store, dashboard, or channel, up to a limit of 50.
Type annotations and code completion for boto3.client("cloudtrail").add_tags
method.
boto3 documentation
# add_tags method definition
def add_tags(
self,
*,
ResourceId: str,
TagsList: Sequence[TagTypeDef], # (1)
) -> dict[str, Any]:
...
- See TagTypeDef
# add_tags method usage example with argument unpacking
kwargs: AddTagsRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"TagsList": ...,
}
parent.add_tags(**kwargs)
cancel_query#
Cancels a query if the query is not in a terminated state, such as
CANCELLED
, FAILED
, TIMED_OUT
, or
FINISHED
.
Type annotations and code completion for boto3.client("cloudtrail").cancel_query
method.
boto3 documentation
# cancel_query method definition
def cancel_query(
self,
*,
QueryId: str,
EventDataStore: str = ...,
EventDataStoreOwnerAccountId: str = ...,
) -> CancelQueryResponseTypeDef: # (1)
...
# cancel_query method usage example with argument unpacking
kwargs: CancelQueryRequestRequestTypeDef = { # (1)
"QueryId": ...,
}
parent.cancel_query(**kwargs)
create_channel#
Creates a channel for CloudTrail to ingest events from a partner or external source.
Type annotations and code completion for boto3.client("cloudtrail").create_channel
method.
boto3 documentation
# create_channel method definition
def create_channel(
self,
*,
Name: str,
Source: str,
Destinations: Sequence[DestinationTypeDef], # (1)
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateChannelResponseTypeDef: # (3)
...
- See DestinationTypeDef
- See TagTypeDef
- See CreateChannelResponseTypeDef
# create_channel method usage example with argument unpacking
kwargs: CreateChannelRequestRequestTypeDef = { # (1)
"Name": ...,
"Source": ...,
"Destinations": ...,
}
parent.create_channel(**kwargs)
create_dashboard#
Creates a custom dashboard or the Highlights dashboard.
Type annotations and code completion for boto3.client("cloudtrail").create_dashboard
method.
boto3 documentation
# create_dashboard method definition
def create_dashboard(
self,
*,
Name: str,
RefreshSchedule: RefreshScheduleTypeDef = ..., # (1)
TagsList: Sequence[TagTypeDef] = ..., # (2)
TerminationProtectionEnabled: bool = ...,
Widgets: Sequence[RequestWidgetTypeDef] = ..., # (3)
) -> CreateDashboardResponseTypeDef: # (4)
...
- See RefreshScheduleTypeDef
- See TagTypeDef
- See RequestWidgetTypeDef
- See CreateDashboardResponseTypeDef
# create_dashboard method usage example with argument unpacking
kwargs: CreateDashboardRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_dashboard(**kwargs)
create_event_data_store#
Creates a new event data store.
Type annotations and code completion for boto3.client("cloudtrail").create_event_data_store
method.
boto3 documentation
# create_event_data_store method definition
def create_event_data_store(
self,
*,
Name: str,
AdvancedEventSelectors: Sequence[AdvancedEventSelectorUnionTypeDef] = ..., # (1)
MultiRegionEnabled: bool = ...,
OrganizationEnabled: bool = ...,
RetentionPeriod: int = ...,
TerminationProtectionEnabled: bool = ...,
TagsList: Sequence[TagTypeDef] = ..., # (2)
KmsKeyId: str = ...,
StartIngestion: bool = ...,
BillingMode: BillingModeType = ..., # (3)
) -> CreateEventDataStoreResponseTypeDef: # (4)
...
- See AdvancedEventSelectorTypeDef AdvancedEventSelectorOutputTypeDef
- See TagTypeDef
- See BillingModeType
- See CreateEventDataStoreResponseTypeDef
# create_event_data_store method usage example with argument unpacking
kwargs: CreateEventDataStoreRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_event_data_store(**kwargs)
create_trail#
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
Type annotations and code completion for boto3.client("cloudtrail").create_trail
method.
boto3 documentation
# create_trail method definition
def create_trail(
self,
*,
Name: str,
S3BucketName: str,
S3KeyPrefix: str = ...,
SnsTopicName: str = ...,
IncludeGlobalServiceEvents: bool = ...,
IsMultiRegionTrail: bool = ...,
EnableLogFileValidation: bool = ...,
CloudWatchLogsLogGroupArn: str = ...,
CloudWatchLogsRoleArn: str = ...,
KmsKeyId: str = ...,
IsOrganizationTrail: bool = ...,
TagsList: Sequence[TagTypeDef] = ..., # (1)
) -> CreateTrailResponseTypeDef: # (2)
...
- See TagTypeDef
- See CreateTrailResponseTypeDef
# create_trail method usage example with argument unpacking
kwargs: CreateTrailRequestRequestTypeDef = { # (1)
"Name": ...,
"S3BucketName": ...,
}
parent.create_trail(**kwargs)
delete_channel#
Deletes a channel.
Type annotations and code completion for boto3.client("cloudtrail").delete_channel
method.
boto3 documentation
# delete_channel method definition
def delete_channel(
self,
*,
Channel: str,
) -> dict[str, Any]:
...
# delete_channel method usage example with argument unpacking
kwargs: DeleteChannelRequestRequestTypeDef = { # (1)
"Channel": ...,
}
parent.delete_channel(**kwargs)
delete_dashboard#
Deletes the specified dashboard.
Type annotations and code completion for boto3.client("cloudtrail").delete_dashboard
method.
boto3 documentation
# delete_dashboard method definition
def delete_dashboard(
self,
*,
DashboardId: str,
) -> dict[str, Any]:
...
# delete_dashboard method usage example with argument unpacking
kwargs: DeleteDashboardRequestRequestTypeDef = { # (1)
"DashboardId": ...,
}
parent.delete_dashboard(**kwargs)
delete_event_data_store#
Disables the event data store specified by EventDataStore
, which
accepts an event data store ARN.
Type annotations and code completion for boto3.client("cloudtrail").delete_event_data_store
method.
boto3 documentation
# delete_event_data_store method definition
def delete_event_data_store(
self,
*,
EventDataStore: str,
) -> dict[str, Any]:
...
# delete_event_data_store method usage example with argument unpacking
kwargs: DeleteEventDataStoreRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.delete_event_data_store(**kwargs)
delete_resource_policy#
Deletes the resource-based policy attached to the CloudTrail event data store, dashboard, or channel.
Type annotations and code completion for boto3.client("cloudtrail").delete_resource_policy
method.
boto3 documentation
# delete_resource_policy method definition
def delete_resource_policy(
self,
*,
ResourceArn: str,
) -> dict[str, Any]:
...
# delete_resource_policy method usage example with argument unpacking
kwargs: DeleteResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.delete_resource_policy(**kwargs)
delete_trail#
Deletes a trail.
Type annotations and code completion for boto3.client("cloudtrail").delete_trail
method.
boto3 documentation
# delete_trail method definition
def delete_trail(
self,
*,
Name: str,
) -> dict[str, Any]:
...
# delete_trail method usage example with argument unpacking
kwargs: DeleteTrailRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.delete_trail(**kwargs)
deregister_organization_delegated_admin#
Removes CloudTrail delegated administrator permissions from a member account in an organization.
Type annotations and code completion for boto3.client("cloudtrail").deregister_organization_delegated_admin
method.
boto3 documentation
# deregister_organization_delegated_admin method definition
def deregister_organization_delegated_admin(
self,
*,
DelegatedAdminAccountId: str,
) -> dict[str, Any]:
...
# deregister_organization_delegated_admin method usage example with argument unpacking
kwargs: DeregisterOrganizationDelegatedAdminRequestRequestTypeDef = { # (1)
"DelegatedAdminAccountId": ...,
}
parent.deregister_organization_delegated_admin(**kwargs)
describe_query#
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status.
Type annotations and code completion for boto3.client("cloudtrail").describe_query
method.
boto3 documentation
# describe_query method definition
def describe_query(
self,
*,
EventDataStore: str = ...,
QueryId: str = ...,
QueryAlias: str = ...,
RefreshId: str = ...,
EventDataStoreOwnerAccountId: str = ...,
) -> DescribeQueryResponseTypeDef: # (1)
...
# describe_query method usage example with argument unpacking
kwargs: DescribeQueryRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.describe_query(**kwargs)
describe_trails#
Retrieves settings for one or more trails associated with the current Region for your account.
Type annotations and code completion for boto3.client("cloudtrail").describe_trails
method.
boto3 documentation
# describe_trails method definition
def describe_trails(
self,
*,
trailNameList: Sequence[str] = ...,
includeShadowTrails: bool = ...,
) -> DescribeTrailsResponseTypeDef: # (1)
...
# describe_trails method usage example with argument unpacking
kwargs: DescribeTrailsRequestRequestTypeDef = { # (1)
"trailNameList": ...,
}
parent.describe_trails(**kwargs)
disable_federation#
Disables Lake query federation on the specified event data store.
Type annotations and code completion for boto3.client("cloudtrail").disable_federation
method.
boto3 documentation
# disable_federation method definition
def disable_federation(
self,
*,
EventDataStore: str,
) -> DisableFederationResponseTypeDef: # (1)
...
# disable_federation method usage example with argument unpacking
kwargs: DisableFederationRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.disable_federation(**kwargs)
enable_federation#
Enables Lake query federation on the specified event data store.
Type annotations and code completion for boto3.client("cloudtrail").enable_federation
method.
boto3 documentation
# enable_federation method definition
def enable_federation(
self,
*,
EventDataStore: str,
FederationRoleArn: str,
) -> EnableFederationResponseTypeDef: # (1)
...
# enable_federation method usage example with argument unpacking
kwargs: EnableFederationRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
"FederationRoleArn": ...,
}
parent.enable_federation(**kwargs)
generate_query#
Generates a query from a natural language prompt.
Type annotations and code completion for boto3.client("cloudtrail").generate_query
method.
boto3 documentation
# generate_query method definition
def generate_query(
self,
*,
EventDataStores: Sequence[str],
Prompt: str,
) -> GenerateQueryResponseTypeDef: # (1)
...
# generate_query method usage example with argument unpacking
kwargs: GenerateQueryRequestRequestTypeDef = { # (1)
"EventDataStores": ...,
"Prompt": ...,
}
parent.generate_query(**kwargs)
get_channel#
Returns information about a specific channel.
Type annotations and code completion for boto3.client("cloudtrail").get_channel
method.
boto3 documentation
# get_channel method definition
def get_channel(
self,
*,
Channel: str,
) -> GetChannelResponseTypeDef: # (1)
...
# get_channel method usage example with argument unpacking
kwargs: GetChannelRequestRequestTypeDef = { # (1)
"Channel": ...,
}
parent.get_channel(**kwargs)
get_dashboard#
Returns the specified dashboard.
Type annotations and code completion for boto3.client("cloudtrail").get_dashboard
method.
boto3 documentation
# get_dashboard method definition
def get_dashboard(
self,
*,
DashboardId: str,
) -> GetDashboardResponseTypeDef: # (1)
...
# get_dashboard method usage example with argument unpacking
kwargs: GetDashboardRequestRequestTypeDef = { # (1)
"DashboardId": ...,
}
parent.get_dashboard(**kwargs)
get_event_data_store#
Returns information about an event data store specified as either an ARN or the ID portion of the ARN.
Type annotations and code completion for boto3.client("cloudtrail").get_event_data_store
method.
boto3 documentation
# get_event_data_store method definition
def get_event_data_store(
self,
*,
EventDataStore: str,
) -> GetEventDataStoreResponseTypeDef: # (1)
...
# get_event_data_store method usage example with argument unpacking
kwargs: GetEventDataStoreRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.get_event_data_store(**kwargs)
get_event_selectors#
Describes the settings for the event selectors that you configured for your trail.
Type annotations and code completion for boto3.client("cloudtrail").get_event_selectors
method.
boto3 documentation
# get_event_selectors method definition
def get_event_selectors(
self,
*,
TrailName: str,
) -> GetEventSelectorsResponseTypeDef: # (1)
...
# get_event_selectors method usage example with argument unpacking
kwargs: GetEventSelectorsRequestRequestTypeDef = { # (1)
"TrailName": ...,
}
parent.get_event_selectors(**kwargs)
get_import#
Returns information about a specific import.
Type annotations and code completion for boto3.client("cloudtrail").get_import
method.
boto3 documentation
# get_import method definition
def get_import(
self,
*,
ImportId: str,
) -> GetImportResponseTypeDef: # (1)
...
# get_import method usage example with argument unpacking
kwargs: GetImportRequestRequestTypeDef = { # (1)
"ImportId": ...,
}
parent.get_import(**kwargs)
get_insight_selectors#
Describes the settings for the Insights event selectors that you configured for your trail or event data store.
Type annotations and code completion for boto3.client("cloudtrail").get_insight_selectors
method.
boto3 documentation
# get_insight_selectors method definition
def get_insight_selectors(
self,
*,
TrailName: str = ...,
EventDataStore: str = ...,
) -> GetInsightSelectorsResponseTypeDef: # (1)
...
# get_insight_selectors method usage example with argument unpacking
kwargs: GetInsightSelectorsRequestRequestTypeDef = { # (1)
"TrailName": ...,
}
parent.get_insight_selectors(**kwargs)
get_query_results#
Gets event data results of a query.
Type annotations and code completion for boto3.client("cloudtrail").get_query_results
method.
boto3 documentation
# get_query_results method definition
def get_query_results(
self,
*,
QueryId: str,
EventDataStore: str = ...,
NextToken: str = ...,
MaxQueryResults: int = ...,
EventDataStoreOwnerAccountId: str = ...,
) -> GetQueryResultsResponseTypeDef: # (1)
...
# get_query_results method usage example with argument unpacking
kwargs: GetQueryResultsRequestRequestTypeDef = { # (1)
"QueryId": ...,
}
parent.get_query_results(**kwargs)
get_resource_policy#
Retrieves the JSON text of the resource-based policy document attached to the CloudTrail event data store, dashboard, or channel.
Type annotations and code completion for boto3.client("cloudtrail").get_resource_policy
method.
boto3 documentation
# get_resource_policy method definition
def get_resource_policy(
self,
*,
ResourceArn: str,
) -> GetResourcePolicyResponseTypeDef: # (1)
...
# get_resource_policy method usage example with argument unpacking
kwargs: GetResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.get_resource_policy(**kwargs)
get_trail#
Returns settings information for a specified trail.
Type annotations and code completion for boto3.client("cloudtrail").get_trail
method.
boto3 documentation
# get_trail method definition
def get_trail(
self,
*,
Name: str,
) -> GetTrailResponseTypeDef: # (1)
...
# get_trail method usage example with argument unpacking
kwargs: GetTrailRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.get_trail(**kwargs)
get_trail_status#
Returns a JSON-formatted list of information about the specified trail.
Type annotations and code completion for boto3.client("cloudtrail").get_trail_status
method.
boto3 documentation
# get_trail_status method definition
def get_trail_status(
self,
*,
Name: str,
) -> GetTrailStatusResponseTypeDef: # (1)
...
# get_trail_status method usage example with argument unpacking
kwargs: GetTrailStatusRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.get_trail_status(**kwargs)
list_channels#
Lists the channels in the current account, and their source names.
Type annotations and code completion for boto3.client("cloudtrail").list_channels
method.
boto3 documentation
# list_channels method definition
def list_channels(
self,
*,
MaxResults: int = ...,
NextToken: str = ...,
) -> ListChannelsResponseTypeDef: # (1)
...
# list_channels method usage example with argument unpacking
kwargs: ListChannelsRequestRequestTypeDef = { # (1)
"MaxResults": ...,
}
parent.list_channels(**kwargs)
list_dashboards#
Returns information about all dashboards in the account, in the current Region.
Type annotations and code completion for boto3.client("cloudtrail").list_dashboards
method.
boto3 documentation
# list_dashboards method definition
def list_dashboards(
self,
*,
NamePrefix: str = ...,
Type: DashboardTypeType = ..., # (1)
NextToken: str = ...,
MaxResults: int = ...,
) -> ListDashboardsResponseTypeDef: # (2)
...
# list_dashboards method usage example with argument unpacking
kwargs: ListDashboardsRequestRequestTypeDef = { # (1)
"NamePrefix": ...,
}
parent.list_dashboards(**kwargs)
list_event_data_stores#
Returns information about all event data stores in the account, in the current Region.
Type annotations and code completion for boto3.client("cloudtrail").list_event_data_stores
method.
boto3 documentation
# list_event_data_stores method definition
def list_event_data_stores(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListEventDataStoresResponseTypeDef: # (1)
...
# list_event_data_stores method usage example with argument unpacking
kwargs: ListEventDataStoresRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_event_data_stores(**kwargs)
list_import_failures#
Returns a list of failures for the specified import.
Type annotations and code completion for boto3.client("cloudtrail").list_import_failures
method.
boto3 documentation
# list_import_failures method definition
def list_import_failures(
self,
*,
ImportId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> ListImportFailuresResponseTypeDef: # (1)
...
# list_import_failures method usage example with argument unpacking
kwargs: ListImportFailuresRequestRequestTypeDef = { # (1)
"ImportId": ...,
}
parent.list_import_failures(**kwargs)
list_imports#
Returns information on all imports, or a select set of imports by
ImportStatus
or Destination
.
Type annotations and code completion for boto3.client("cloudtrail").list_imports
method.
boto3 documentation
# list_imports method definition
def list_imports(
self,
*,
MaxResults: int = ...,
Destination: str = ...,
ImportStatus: ImportStatusType = ..., # (1)
NextToken: str = ...,
) -> ListImportsResponseTypeDef: # (2)
...
# list_imports method usage example with argument unpacking
kwargs: ListImportsRequestRequestTypeDef = { # (1)
"MaxResults": ...,
}
parent.list_imports(**kwargs)
list_insights_metric_data#
Returns Insights metrics data for trails that have enabled Insights.
Type annotations and code completion for boto3.client("cloudtrail").list_insights_metric_data
method.
boto3 documentation
# list_insights_metric_data method definition
def list_insights_metric_data(
self,
*,
EventSource: str,
EventName: str,
InsightType: InsightTypeType, # (1)
ErrorCode: str = ...,
StartTime: TimestampTypeDef = ...,
EndTime: TimestampTypeDef = ...,
Period: int = ...,
DataType: InsightsMetricDataTypeType = ..., # (2)
MaxResults: int = ...,
NextToken: str = ...,
) -> ListInsightsMetricDataResponseTypeDef: # (3)
...
# list_insights_metric_data method usage example with argument unpacking
kwargs: ListInsightsMetricDataRequestRequestTypeDef = { # (1)
"EventSource": ...,
"EventName": ...,
"InsightType": ...,
}
parent.list_insights_metric_data(**kwargs)
list_public_keys#
Returns all public keys whose private keys were used to sign the digest files within the specified time range.
Type annotations and code completion for boto3.client("cloudtrail").list_public_keys
method.
boto3 documentation
# list_public_keys method definition
def list_public_keys(
self,
*,
StartTime: TimestampTypeDef = ...,
EndTime: TimestampTypeDef = ...,
NextToken: str = ...,
) -> ListPublicKeysResponseTypeDef: # (1)
...
# list_public_keys method usage example with argument unpacking
kwargs: ListPublicKeysRequestRequestTypeDef = { # (1)
"StartTime": ...,
}
parent.list_public_keys(**kwargs)
list_queries#
Returns a list of queries and query statuses for the past seven days.
Type annotations and code completion for boto3.client("cloudtrail").list_queries
method.
boto3 documentation
# list_queries method definition
def list_queries(
self,
*,
EventDataStore: str,
NextToken: str = ...,
MaxResults: int = ...,
StartTime: TimestampTypeDef = ...,
EndTime: TimestampTypeDef = ...,
QueryStatus: QueryStatusType = ..., # (1)
) -> ListQueriesResponseTypeDef: # (2)
...
# list_queries method usage example with argument unpacking
kwargs: ListQueriesRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.list_queries(**kwargs)
list_tags#
Lists the tags for the specified trails, event data stores, dashboards, or channels in the current Region.
Type annotations and code completion for boto3.client("cloudtrail").list_tags
method.
boto3 documentation
# list_tags method definition
def list_tags(
self,
*,
ResourceIdList: Sequence[str],
NextToken: str = ...,
) -> ListTagsResponseTypeDef: # (1)
...
# list_tags method usage example with argument unpacking
kwargs: ListTagsRequestRequestTypeDef = { # (1)
"ResourceIdList": ...,
}
parent.list_tags(**kwargs)
list_trails#
Lists trails that are in the current account.
Type annotations and code completion for boto3.client("cloudtrail").list_trails
method.
boto3 documentation
# list_trails method definition
def list_trails(
self,
*,
NextToken: str = ...,
) -> ListTrailsResponseTypeDef: # (1)
...
# list_trails method usage example with argument unpacking
kwargs: ListTrailsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_trails(**kwargs)
lookup_events#
Looks up management events or C...
Type annotations and code completion for boto3.client("cloudtrail").lookup_events
method.
boto3 documentation
# lookup_events method definition
def lookup_events(
self,
*,
LookupAttributes: Sequence[LookupAttributeTypeDef] = ..., # (1)
StartTime: TimestampTypeDef = ...,
EndTime: TimestampTypeDef = ...,
EventCategory: EventCategoryType = ..., # (2)
MaxResults: int = ...,
NextToken: str = ...,
) -> LookupEventsResponseTypeDef: # (3)
...
# lookup_events method usage example with argument unpacking
kwargs: LookupEventsRequestRequestTypeDef = { # (1)
"LookupAttributes": ...,
}
parent.lookup_events(**kwargs)
put_event_selectors#
Configures event selectors (also referred to as basic event selectors) or advanced event selectors for your trail.
Type annotations and code completion for boto3.client("cloudtrail").put_event_selectors
method.
boto3 documentation
# put_event_selectors method definition
def put_event_selectors(
self,
*,
TrailName: str,
EventSelectors: Sequence[EventSelectorUnionTypeDef] = ..., # (1)
AdvancedEventSelectors: Sequence[AdvancedEventSelectorTypeDef] = ..., # (2)
) -> PutEventSelectorsResponseTypeDef: # (3)
...
- See EventSelectorTypeDef EventSelectorOutputTypeDef
- See AdvancedEventSelectorTypeDef
- See PutEventSelectorsResponseTypeDef
# put_event_selectors method usage example with argument unpacking
kwargs: PutEventSelectorsRequestRequestTypeDef = { # (1)
"TrailName": ...,
}
parent.put_event_selectors(**kwargs)
put_insight_selectors#
Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail or event data store.
Type annotations and code completion for boto3.client("cloudtrail").put_insight_selectors
method.
boto3 documentation
# put_insight_selectors method definition
def put_insight_selectors(
self,
*,
InsightSelectors: Sequence[InsightSelectorTypeDef], # (1)
TrailName: str = ...,
EventDataStore: str = ...,
InsightsDestination: str = ...,
) -> PutInsightSelectorsResponseTypeDef: # (2)
...
# put_insight_selectors method usage example with argument unpacking
kwargs: PutInsightSelectorsRequestRequestTypeDef = { # (1)
"InsightSelectors": ...,
}
parent.put_insight_selectors(**kwargs)
put_resource_policy#
Attaches a resource-based permission policy to a CloudTrail event data store, dashboard, or channel.
Type annotations and code completion for boto3.client("cloudtrail").put_resource_policy
method.
boto3 documentation
# put_resource_policy method definition
def put_resource_policy(
self,
*,
ResourceArn: str,
ResourcePolicy: str,
) -> PutResourcePolicyResponseTypeDef: # (1)
...
# put_resource_policy method usage example with argument unpacking
kwargs: PutResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"ResourcePolicy": ...,
}
parent.put_resource_policy(**kwargs)
register_organization_delegated_admin#
Registers an organization's member account as the CloudTrail delegated administrator.
Type annotations and code completion for boto3.client("cloudtrail").register_organization_delegated_admin
method.
boto3 documentation
# register_organization_delegated_admin method definition
def register_organization_delegated_admin(
self,
*,
MemberAccountId: str,
) -> dict[str, Any]:
...
# register_organization_delegated_admin method usage example with argument unpacking
kwargs: RegisterOrganizationDelegatedAdminRequestRequestTypeDef = { # (1)
"MemberAccountId": ...,
}
parent.register_organization_delegated_admin(**kwargs)
remove_tags#
Removes the specified tags from a trail, event data store, dashboard, or channel.
Type annotations and code completion for boto3.client("cloudtrail").remove_tags
method.
boto3 documentation
# remove_tags method definition
def remove_tags(
self,
*,
ResourceId: str,
TagsList: Sequence[TagTypeDef], # (1)
) -> dict[str, Any]:
...
- See TagTypeDef
# remove_tags method usage example with argument unpacking
kwargs: RemoveTagsRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"TagsList": ...,
}
parent.remove_tags(**kwargs)
restore_event_data_store#
Restores a deleted event data store specified by EventDataStore
,
which accepts an event data store ARN.
Type annotations and code completion for boto3.client("cloudtrail").restore_event_data_store
method.
boto3 documentation
# restore_event_data_store method definition
def restore_event_data_store(
self,
*,
EventDataStore: str,
) -> RestoreEventDataStoreResponseTypeDef: # (1)
...
# restore_event_data_store method usage example with argument unpacking
kwargs: RestoreEventDataStoreRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.restore_event_data_store(**kwargs)
start_dashboard_refresh#
Starts a refresh of the specified dashboard.
Type annotations and code completion for boto3.client("cloudtrail").start_dashboard_refresh
method.
boto3 documentation
# start_dashboard_refresh method definition
def start_dashboard_refresh(
self,
*,
DashboardId: str,
QueryParameterValues: Mapping[str, str] = ...,
) -> StartDashboardRefreshResponseTypeDef: # (1)
...
# start_dashboard_refresh method usage example with argument unpacking
kwargs: StartDashboardRefreshRequestRequestTypeDef = { # (1)
"DashboardId": ...,
}
parent.start_dashboard_refresh(**kwargs)
start_event_data_store_ingestion#
Starts the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN.
Type annotations and code completion for boto3.client("cloudtrail").start_event_data_store_ingestion
method.
boto3 documentation
# start_event_data_store_ingestion method definition
def start_event_data_store_ingestion(
self,
*,
EventDataStore: str,
) -> dict[str, Any]:
...
# start_event_data_store_ingestion method usage example with argument unpacking
kwargs: StartEventDataStoreIngestionRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.start_event_data_store_ingestion(**kwargs)
start_import#
Starts an import of logged trail events from a source S3 bucket to a destination event data store.
Type annotations and code completion for boto3.client("cloudtrail").start_import
method.
boto3 documentation
# start_import method definition
def start_import(
self,
*,
Destinations: Sequence[str] = ...,
ImportSource: ImportSourceTypeDef = ..., # (1)
StartEventTime: TimestampTypeDef = ...,
EndEventTime: TimestampTypeDef = ...,
ImportId: str = ...,
) -> StartImportResponseTypeDef: # (2)
...
# start_import method usage example with argument unpacking
kwargs: StartImportRequestRequestTypeDef = { # (1)
"Destinations": ...,
}
parent.start_import(**kwargs)
start_logging#
Starts the recording of Amazon Web Services API calls and log file delivery for a trail.
Type annotations and code completion for boto3.client("cloudtrail").start_logging
method.
boto3 documentation
# start_logging method definition
def start_logging(
self,
*,
Name: str,
) -> dict[str, Any]:
...
# start_logging method usage example with argument unpacking
kwargs: StartLoggingRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.start_logging(**kwargs)
start_query#
Starts a CloudTrail Lake query.
Type annotations and code completion for boto3.client("cloudtrail").start_query
method.
boto3 documentation
# start_query method definition
def start_query(
self,
*,
QueryStatement: str = ...,
DeliveryS3Uri: str = ...,
QueryAlias: str = ...,
QueryParameters: Sequence[str] = ...,
EventDataStoreOwnerAccountId: str = ...,
) -> StartQueryResponseTypeDef: # (1)
...
# start_query method usage example with argument unpacking
kwargs: StartQueryRequestRequestTypeDef = { # (1)
"QueryStatement": ...,
}
parent.start_query(**kwargs)
stop_event_data_store_ingestion#
Stops the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN.
Type annotations and code completion for boto3.client("cloudtrail").stop_event_data_store_ingestion
method.
boto3 documentation
# stop_event_data_store_ingestion method definition
def stop_event_data_store_ingestion(
self,
*,
EventDataStore: str,
) -> dict[str, Any]:
...
# stop_event_data_store_ingestion method usage example with argument unpacking
kwargs: StopEventDataStoreIngestionRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.stop_event_data_store_ingestion(**kwargs)
stop_import#
Stops a specified import.
Type annotations and code completion for boto3.client("cloudtrail").stop_import
method.
boto3 documentation
# stop_import method definition
def stop_import(
self,
*,
ImportId: str,
) -> StopImportResponseTypeDef: # (1)
...
# stop_import method usage example with argument unpacking
kwargs: StopImportRequestRequestTypeDef = { # (1)
"ImportId": ...,
}
parent.stop_import(**kwargs)
stop_logging#
Suspends the recording of Amazon Web Services API calls and log file delivery for the specified trail.
Type annotations and code completion for boto3.client("cloudtrail").stop_logging
method.
boto3 documentation
# stop_logging method definition
def stop_logging(
self,
*,
Name: str,
) -> dict[str, Any]:
...
# stop_logging method usage example with argument unpacking
kwargs: StopLoggingRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.stop_logging(**kwargs)
update_channel#
Updates a channel specified by a required channel ARN or UUID.
Type annotations and code completion for boto3.client("cloudtrail").update_channel
method.
boto3 documentation
# update_channel method definition
def update_channel(
self,
*,
Channel: str,
Destinations: Sequence[DestinationTypeDef] = ..., # (1)
Name: str = ...,
) -> UpdateChannelResponseTypeDef: # (2)
...
# update_channel method usage example with argument unpacking
kwargs: UpdateChannelRequestRequestTypeDef = { # (1)
"Channel": ...,
}
parent.update_channel(**kwargs)
update_dashboard#
Updates the specified dashboard.
Type annotations and code completion for boto3.client("cloudtrail").update_dashboard
method.
boto3 documentation
# update_dashboard method definition
def update_dashboard(
self,
*,
DashboardId: str,
Widgets: Sequence[RequestWidgetTypeDef] = ..., # (1)
RefreshSchedule: RefreshScheduleTypeDef = ..., # (2)
TerminationProtectionEnabled: bool = ...,
) -> UpdateDashboardResponseTypeDef: # (3)
...
# update_dashboard method usage example with argument unpacking
kwargs: UpdateDashboardRequestRequestTypeDef = { # (1)
"DashboardId": ...,
}
parent.update_dashboard(**kwargs)
update_event_data_store#
Updates an event data store.
Type annotations and code completion for boto3.client("cloudtrail").update_event_data_store
method.
boto3 documentation
# update_event_data_store method definition
def update_event_data_store(
self,
*,
EventDataStore: str,
Name: str = ...,
AdvancedEventSelectors: Sequence[AdvancedEventSelectorTypeDef] = ..., # (1)
MultiRegionEnabled: bool = ...,
OrganizationEnabled: bool = ...,
RetentionPeriod: int = ...,
TerminationProtectionEnabled: bool = ...,
KmsKeyId: str = ...,
BillingMode: BillingModeType = ..., # (2)
) -> UpdateEventDataStoreResponseTypeDef: # (3)
...
# update_event_data_store method usage example with argument unpacking
kwargs: UpdateEventDataStoreRequestRequestTypeDef = { # (1)
"EventDataStore": ...,
}
parent.update_event_data_store(**kwargs)
update_trail#
Updates trail settings that control what events you are logging, and how to handle log files.
Type annotations and code completion for boto3.client("cloudtrail").update_trail
method.
boto3 documentation
# update_trail method definition
def update_trail(
self,
*,
Name: str,
S3BucketName: str = ...,
S3KeyPrefix: str = ...,
SnsTopicName: str = ...,
IncludeGlobalServiceEvents: bool = ...,
IsMultiRegionTrail: bool = ...,
EnableLogFileValidation: bool = ...,
CloudWatchLogsLogGroupArn: str = ...,
CloudWatchLogsRoleArn: str = ...,
KmsKeyId: str = ...,
IsOrganizationTrail: bool = ...,
) -> UpdateTrailResponseTypeDef: # (1)
...
# update_trail method usage example with argument unpacking
kwargs: UpdateTrailRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.update_trail(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("cloudtrail").get_paginator
method with overloads.
client.get_paginator("list_import_failures")
-> ListImportFailuresPaginatorclient.get_paginator("list_imports")
-> ListImportsPaginatorclient.get_paginator("list_public_keys")
-> ListPublicKeysPaginatorclient.get_paginator("list_tags")
-> ListTagsPaginatorclient.get_paginator("list_trails")
-> ListTrailsPaginatorclient.get_paginator("lookup_events")
-> LookupEventsPaginator