CloudTrail#
Client#
- class CloudTrail.Client#
A low-level client representing AWS CloudTrail
This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.
CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.
Note
As an alternative to the API, you can use one of the Amazon Web Services SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail. For example, the SDKs handle cryptographically signing requests, managing errors, and retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to download and install them, see Tools to Build on Amazon Web Services.
See the CloudTrail User Guide for information about the data that is included with each Amazon Web Services API call listed in the log files.
client = session.create_client('cloudtrail')
These are the available methods:
- add_tags
- can_paginate
- cancel_query
- close
- create_channel
- create_event_data_store
- create_trail
- delete_channel
- delete_event_data_store
- delete_resource_policy
- delete_trail
- deregister_organization_delegated_admin
- describe_query
- describe_trails
- disable_federation
- enable_federation
- get_channel
- get_event_data_store
- get_event_selectors
- get_import
- get_insight_selectors
- get_paginator
- get_query_results
- get_resource_policy
- get_trail
- get_trail_status
- get_waiter
- list_channels
- list_event_data_stores
- list_import_failures
- list_imports
- list_insights_metric_data
- list_public_keys
- list_queries
- list_tags
- list_trails
- lookup_events
- put_event_selectors
- put_insight_selectors
- put_resource_policy
- register_organization_delegated_admin
- remove_tags
- restore_event_data_store
- start_event_data_store_ingestion
- start_import
- start_logging
- start_query
- stop_event_data_store_ingestion
- stop_import
- stop_logging
- update_channel
- update_event_data_store
- update_trail
Client Exceptions#
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
- AccessDeniedException
- AccountHasOngoingImportException
- AccountNotFoundException
- AccountNotRegisteredException
- AccountRegisteredException
- CannotDelegateManagementAccountException
- ChannelARNInvalidException
- ChannelAlreadyExistsException
- ChannelExistsForEDSException
- ChannelMaxLimitExceededException
- ChannelNotFoundException
- CloudTrailARNInvalidException
- CloudTrailAccessNotEnabledException
- CloudTrailInvalidClientTokenIdException
- CloudWatchLogsDeliveryUnavailableException
- ConcurrentModificationException
- ConflictException
- DelegatedAdminAccountLimitExceededException
- EventDataStoreARNInvalidException
- EventDataStoreAlreadyExistsException
- EventDataStoreFederationEnabledException
- EventDataStoreHasOngoingImportException
- EventDataStoreMaxLimitExceededException
- EventDataStoreNotFoundException
- EventDataStoreTerminationProtectedException
- ImportNotFoundException
- InactiveEventDataStoreException
- InactiveQueryException
- InsightNotEnabledException
- InsufficientDependencyServiceAccessPermissionException
- InsufficientEncryptionPolicyException
- InsufficientS3BucketPolicyException
- InsufficientSnsTopicPolicyException
- InvalidCloudWatchLogsLogGroupArnException
- InvalidCloudWatchLogsRoleArnException
- InvalidDateRangeException
- InvalidEventCategoryException
- InvalidEventDataStoreCategoryException
- InvalidEventDataStoreStatusException
- InvalidEventSelectorsException
- InvalidHomeRegionException
- InvalidImportSourceException
- InvalidInsightSelectorsException
- InvalidKmsKeyIdException
- InvalidLookupAttributesException
- InvalidMaxResultsException
- InvalidNextTokenException
- InvalidParameterCombinationException
- InvalidParameterException
- InvalidQueryStatementException
- InvalidQueryStatusException
- InvalidS3BucketNameException
- InvalidS3PrefixException
- InvalidSnsTopicNameException
- InvalidSourceException
- InvalidTagParameterException
- InvalidTimeRangeException
- InvalidTokenException
- InvalidTrailNameException
- KmsException
- KmsKeyDisabledException
- KmsKeyNotFoundException
- MaxConcurrentQueriesException
- MaximumNumberOfTrailsExceededException
- NoManagementAccountSLRExistsException
- NotOrganizationManagementAccountException
- NotOrganizationMasterAccountException
- OperationNotPermittedException
- OrganizationNotInAllFeaturesModeException
- OrganizationsNotInUseException
- QueryIdNotFoundException
- ResourceARNNotValidException
- ResourceNotFoundException
- ResourcePolicyNotFoundException
- ResourcePolicyNotValidException
- ResourceTypeNotSupportedException
- S3BucketDoesNotExistException
- TagsLimitExceededException
- ThrottlingException
- TrailAlreadyExistsException
- TrailNotFoundException
- TrailNotProvidedException
- UnsupportedOperationException
Paginators#
Paginators are available on a client instance via the get_paginator
method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide.
The available paginators are: