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.


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.

Actions available for CloudTrail trails

The following actions are available for CloudTrail trails.

  • AddTags

  • CreateTrail

  • DeleteTrail

  • DescribeTrails

  • GetEventSelectors

  • GetInsightSelectors

  • GetTrail

  • GetTrailStatus

  • ListTags

  • ListTrails

  • PutEventSelectors

  • PutInsightSelectors

  • RemoveTags

  • StartLogging

  • StopLogging

  • UpdateTrail

Actions available for CloudTrail event data stores

The following actions are available for CloudTrail event data stores.

  • AddTags

  • CancelQuery

  • CreateEventDataStore

  • DeleteEventDataStore

  • DescribeQuery

  • GetEventDataStore

  • GetQueryResults

  • ListEventDataStores

  • ListTags

  • ListQueries

  • RemoveTags

  • RestoreEventDataStore

  • StartEventDataStoreIngestion

  • StartImport The following additional actions are available for imports.

  • GetImport

  • ListImportFailures

  • ListImports

  • StopImport

  • StartQuery

  • StartEventDataStoreIngestion

  • UpdateEventDataStore

Actions available for CloudTrail channels

The following actions are available for CloudTrail channels.

  • AddTags

  • CreateChannel

  • DeleteChannel

  • DeleteResourcePolicy

  • GetChannel

  • GetResourcePolicy

  • ListChannels

  • ListTags

  • PutResourcePolicy

  • RemoveTags

  • UpdateChannel

Actions available for managing delegated administrators

The following actions are available for adding or a removing a delegated administrator to manage an Organizations organization’s CloudTrail resources.

  • DeregisterOrganizationDelegatedAdmin

  • RegisterOrganizationDelegatedAdmin

import boto3

client = boto3.client('cloudtrail')

These are the available methods:


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: