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.
cloudtrail(config = list())
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've assigned
to the client. The available operations are listed in the
Operations section.
Optional configuration of credentials, endpoint, and/or region.
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint: The complete URL to use for the constructed client.
region: The AWS Region used in instantiating the client.
close_connection: Immediately close all HTTP connections.
timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
s3_force_path_style: Set this to true
to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY
.
svc <- cloudtrail(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical"
)
)
add_tags | Adds one or more tags to a trail or event data store, up to a limit of 50 |
cancel_query | Cancels a query if the query is not in a terminated state, such as CANCELLED, FAILED, TIMED_OUT, or FINISHED |
create_event_data_store | Creates a new event data store |
create_trail | Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket |
delete_event_data_store | Disables the event data store specified by EventDataStore, which accepts an event data store ARN |
delete_trail | Deletes a trail |
describe_query | Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status |
describe_trails | Retrieves settings for one or more trails associated with the current region for your account |
get_event_data_store | Returns information about an event data store specified as either an ARN or the ID portion of the ARN |
get_event_selectors | Describes the settings for the event selectors that you configured for your trail |
get_insight_selectors | Describes the settings for the Insights event selectors that you configured for your trail |
get_query_results | Gets event data results of a query |
get_trail | Returns settings information for a specified trail |
get_trail_status | Returns a JSON-formatted list of information about the specified trail |
list_event_data_stores | Returns information about all event data stores in the account, in the current region |
list_public_keys | Returns all public keys whose private keys were used to sign the digest files within the specified time range |
list_queries | Returns a list of queries and query statuses for the past seven days |
list_tags | Lists the tags for the trail or event data store in the current region |
list_trails | Lists trails that are in the current account |
lookup_events | Looks up management events or CloudTrail Insights events that are captured by CloudTrail |
put_event_selectors | Configures an event selector or advanced event selectors for your trail |
put_insight_selectors | Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail |
remove_tags | Removes the specified tags from a trail or event data store |
restore_event_data_store | Restores a deleted event data store specified by EventDataStore, which accepts an event data store ARN |
start_logging | Starts the recording of Amazon Web Services API calls and log file delivery for a trail |
start_query | Starts a CloudTrail Lake query |
stop_logging | Suspends the recording of Amazon Web Services API calls and log file delivery for the specified trail |
update_event_data_store | Updates an event data store |
update_trail | Updates trail settings that control what events you are logging, and how to handle log files |
if (FALSE) {
svc <- cloudtrail()
svc$add_tags(
Foo = 123
)
}
Run the code above in your browser using DataLab