ExAws.CloudTrail.Core

AWS CloudTrail

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 AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the AWS API call, the source IP address, the request parameters, and the response elements returned by the service.

Note: As an alternative to using the API, you can use one of the AWS SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWSCloudTrail. For example, the SDKs take care of cryptographically signing requests, managing errors, and retrying requests automatically. For information about the AWS SDKs, including how to download and install them, see the Tools for Amazon Web Services page. See the CloudTrail User Guide for information about the data that is included with each AWS API call listed in the log files.

Source

Summary

create_trail!(client, input)

Same as create_trail/2 but raise on error

create_trail(client, input)

CreateTrail

delete_trail!(client, input)

Same as delete_trail/2 but raise on error

delete_trail(client, input)

DeleteTrail

describe_trails!(client, input)

Same as describe_trails/2 but raise on error

describe_trails(client, input)

DescribeTrails

get_trail_status!(client, input)

Same as get_trail_status/2 but raise on error

get_trail_status(client, input)

GetTrailStatus

lookup_events!(client, input)

Same as lookup_events/2 but raise on error

lookup_events(client, input)

LookupEvents

start_logging!(client, input)

Same as start_logging/2 but raise on error

start_logging(client, input)

StartLogging

stop_logging!(client, input)

Same as stop_logging/2 but raise on error

stop_logging(client, input)

StopLogging

update_trail!(client, input)

Same as update_trail/2 but raise on error

update_trail(client, input)

UpdateTrail

Types

get_trail_status_response :: [is_logging: boolean, latest_cloud_watch_logs_delivery_error: binary, latest_cloud_watch_logs_delivery_time: date, latest_delivery_error: binary, latest_delivery_time: date, latest_notification_error: binary, latest_notification_time: date, start_logging_time: date, stop_logging_time: date]

stop_logging_request :: [{:name, binary}]

update_trail_response :: [cloud_watch_logs_log_group_arn: binary, cloud_watch_logs_role_arn: binary, include_global_service_events: boolean, name: binary, s3_bucket_name: binary, s3_key_prefix: binary, sns_topic_name: binary]

resource :: [resource_name: binary, resource_type: binary]

trail :: [cloud_watch_logs_log_group_arn: binary, cloud_watch_logs_role_arn: binary, include_global_service_events: boolean, name: binary, s3_bucket_name: binary, s3_key_prefix: binary, sns_topic_name: binary]

delete_trail_request :: [{:name, binary}]

create_trail_response :: [cloud_watch_logs_log_group_arn: binary, cloud_watch_logs_role_arn: binary, include_global_service_events: boolean, name: binary, s3_bucket_name: binary, s3_key_prefix: binary, sns_topic_name: binary]

date :: integer

describe_trails_response :: [{:trail_list, trail_list}]

lookup_events_request :: [end_time: date, lookup_attributes: lookup_attributes_list, max_results: max_results, next_token: next_token, start_time: date]

max_results :: integer

update_trail_request :: [cloud_watch_logs_log_group_arn: binary, cloud_watch_logs_role_arn: binary, include_global_service_events: boolean, name: binary, s3_bucket_name: binary, s3_key_prefix: binary, sns_topic_name: binary]

get_trail_status_request :: [{:name, binary}]

create_trail_request :: [cloud_watch_logs_log_group_arn: binary, cloud_watch_logs_role_arn: binary, include_global_service_events: boolean, name: binary, s3_bucket_name: binary, s3_key_prefix: binary, sns_topic_name: binary]

lookup_attribute :: [attribute_key: lookup_attribute_key, attribute_value: binary]

describe_trails_request :: [{:trail_name_list, trail_name_list}]

event :: [cloud_trail_event: binary, event_id: binary, event_name: binary, event_time: date, resources: resource_list, username: binary]

lookup_events_response :: [events: events_list, next_token: next_token]

next_token :: binary

trail_name_list :: [binary]

start_logging_request :: [{:name, binary}]

Functions

create_trail(client, input)

Specs:

  • create_trail(client :: ExAws.CloudTrail.t, input :: create_trail_request) :: ExAws.Request.JSON.response_t

CreateTrail

From the command line, use create-subscription.

Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.

Source
create_trail!(client, input)

Specs:

  • create_trail!(client :: ExAws.CloudTrail.t, input :: create_trail_request) :: ExAws.Request.JSON.success_t | no_return

Same as create_trail/2 but raise on error.

Source
delete_trail(client, input)

Specs:

  • delete_trail(client :: ExAws.CloudTrail.t, input :: delete_trail_request) :: ExAws.Request.JSON.response_t

DeleteTrail

Deletes a trail.

Source
delete_trail!(client, input)

Specs:

  • delete_trail!(client :: ExAws.CloudTrail.t, input :: delete_trail_request) :: ExAws.Request.JSON.success_t | no_return

Same as delete_trail/2 but raise on error.

Source
describe_trails(client, input)

Specs:

DescribeTrails

Retrieves settings for the trail associated with the current region for your account.

Source
describe_trails!(client, input)

Specs:

  • describe_trails!(client :: ExAws.CloudTrail.t, input :: describe_trails_request) :: ExAws.Request.JSON.success_t | no_return

Same as describe_trails/2 but raise on error.

Source
get_trail_status(client, input)

Specs:

GetTrailStatus

Returns a JSON-formatted list of information about the specified trail. Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop logging times for each trail.

Source
get_trail_status!(client, input)

Specs:

  • get_trail_status!(client :: ExAws.CloudTrail.t, input :: get_trail_status_request) :: ExAws.Request.JSON.success_t | no_return

Same as get_trail_status/2 but raise on error.

Source
lookup_events(client, input)

Specs:

  • lookup_events(client :: ExAws.CloudTrail.t, input :: lookup_events_request) :: ExAws.Request.JSON.response_t

LookupEvents

Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports five different attributes: time range (defined by a start time and end time), user name, event name, resource type, and resource name. All attributes are optional. The maximum number of attributes that can be specified in any one lookup request are time range and one other attribute. The default number of results returned is 10, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results. The rate of lookup requests is limited to one per second per account.

Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.

Source
lookup_events!(client, input)

Specs:

  • lookup_events!(client :: ExAws.CloudTrail.t, input :: lookup_events_request) :: ExAws.Request.JSON.success_t | no_return

Same as lookup_events/2 but raise on error.

Source
start_logging(client, input)

Specs:

  • start_logging(client :: ExAws.CloudTrail.t, input :: start_logging_request) :: ExAws.Request.JSON.response_t

StartLogging

Starts the recording of AWS API calls and log file delivery for a trail.

Source
start_logging!(client, input)

Specs:

  • start_logging!(client :: ExAws.CloudTrail.t, input :: start_logging_request) :: ExAws.Request.JSON.success_t | no_return

Same as start_logging/2 but raise on error.

Source
stop_logging(client, input)

Specs:

  • stop_logging(client :: ExAws.CloudTrail.t, input :: stop_logging_request) :: ExAws.Request.JSON.response_t

StopLogging

Suspends the recording of AWS API calls and log file delivery for the specified trail. Under most circumstances, there is no need to use this action. You can update a trail without stopping it first. This action is the only way to stop recording.

Source
stop_logging!(client, input)

Specs:

  • stop_logging!(client :: ExAws.CloudTrail.t, input :: stop_logging_request) :: ExAws.Request.JSON.success_t | no_return

Same as stop_logging/2 but raise on error.

Source
update_trail(client, input)

Specs:

  • update_trail(client :: ExAws.CloudTrail.t, input :: update_trail_request) :: ExAws.Request.JSON.response_t

UpdateTrail

From the command line, use update-subscription.

Updates the settings that specify delivery of log files. Changes to a trail do not require stopping the CloudTrail service. Use this action to designate an existing bucket for log delivery. If the existing bucket has previously been a target for CloudTrail log files, an IAM policy exists for the bucket.

Source
update_trail!(client, input)

Specs:

  • update_trail!(client :: ExAws.CloudTrail.t, input :: update_trail_request) :: ExAws.Request.JSON.success_t | no_return

Same as update_trail/2 but raise on error.

Source