amazonka-cloudtrail-2.0: Amazon CloudTrail SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudTrail.Lens

Description

 
Synopsis

Operations

AddTags

addTags_resourceId :: Lens' AddTags Text Source #

Specifies the ARN of the trail or event data store to which one or more tags will be added. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

addTags_tagsList :: Lens' AddTags [Tag] Source #

Contains a list of tags, up to a limit of 50

addTagsResponse_httpStatus :: Lens' AddTagsResponse Int Source #

The response's http status code.

CancelQuery

cancelQuery_eventDataStore :: Lens' CancelQuery (Maybe Text) Source #

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.

cancelQuery_queryId :: Lens' CancelQuery Text Source #

The ID of the query that you want to cancel. The QueryId comes from the response of a StartQuery operation.

cancelQueryResponse_queryStatus :: Lens' CancelQueryResponse QueryStatus Source #

Shows the status of a query after a CancelQuery request. Typically, the values shown are either RUNNING or CANCELLED.

CreateEventDataStore

createEventDataStore_advancedEventSelectors :: Lens' CreateEventDataStore (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors to use to select the events for the data store. For more information about how to use advanced event selectors, see Log events by using advanced event selectors in the CloudTrail User Guide.

createEventDataStore_kmsKeyId :: Lens' CreateEventDataStore (Maybe Text) Source #

Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by alias/, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.

Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.

CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.

Examples:

  • alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  • 12345678-1234-1234-1234-123456789012

createEventDataStore_multiRegionEnabled :: Lens' CreateEventDataStore (Maybe Bool) Source #

Specifies whether the event data store includes events from all regions, or only from the region in which the event data store is created.

createEventDataStore_organizationEnabled :: Lens' CreateEventDataStore (Maybe Bool) Source #

Specifies whether an event data store collects events logged for an organization in Organizations.

createEventDataStore_retentionPeriod :: Lens' CreateEventDataStore (Maybe Natural) Source #

The retention period of the event data store, in days. You can set a retention period of up to 2557 days, the equivalent of seven years.

createEventDataStore_terminationProtectionEnabled :: Lens' CreateEventDataStore (Maybe Bool) Source #

Specifies whether termination protection is enabled for the event data store. If termination protection is enabled, you cannot delete the event data store until termination protection is disabled.

createEventDataStore_name :: Lens' CreateEventDataStore Text Source #

The name of the event data store.

createEventDataStoreResponse_advancedEventSelectors :: Lens' CreateEventDataStoreResponse (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors that were used to select the events for the data store.

createEventDataStoreResponse_createdTimestamp :: Lens' CreateEventDataStoreResponse (Maybe UTCTime) Source #

The timestamp that shows when the event data store was created.

createEventDataStoreResponse_kmsKeyId :: Lens' CreateEventDataStoreResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

createEventDataStoreResponse_multiRegionEnabled :: Lens' CreateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether the event data store collects events from all regions, or only from the region in which it was created.

createEventDataStoreResponse_organizationEnabled :: Lens' CreateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether an event data store is collecting logged events for an organization in Organizations.

createEventDataStoreResponse_retentionPeriod :: Lens' CreateEventDataStoreResponse (Maybe Natural) Source #

The retention period of an event data store, in days.

createEventDataStoreResponse_terminationProtectionEnabled :: Lens' CreateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether termination protection is enabled for the event data store.

createEventDataStoreResponse_updatedTimestamp :: Lens' CreateEventDataStoreResponse (Maybe UTCTime) Source #

The timestamp that shows when an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

CreateTrail

createTrail_cloudWatchLogsLogGroupArn :: Lens' CreateTrail (Maybe Text) Source #

Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.

createTrail_cloudWatchLogsRoleArn :: Lens' CreateTrail (Maybe Text) Source #

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

createTrail_enableLogFileValidation :: Lens' CreateTrail (Maybe Bool) Source #

Specifies whether log file integrity validation is enabled. The default is false.

When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.

createTrail_includeGlobalServiceEvents :: Lens' CreateTrail (Maybe Bool) Source #

Specifies whether the trail is publishing events from global services such as IAM to the log files.

createTrail_isMultiRegionTrail :: Lens' CreateTrail (Maybe Bool) Source #

Specifies whether the trail is created in the current region or in all regions. The default is false, which creates a trail only in the region where you are signed in. As a best practice, consider creating trails that log events in all regions.

createTrail_isOrganizationTrail :: Lens' CreateTrail (Maybe Bool) Source #

Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in Organizations.

createTrail_kmsKeyId :: Lens' CreateTrail (Maybe Text) Source #

Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by alias/, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.

CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.

Examples:

  • alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  • 12345678-1234-1234-1234-123456789012

createTrail_s3KeyPrefix :: Lens' CreateTrail (Maybe Text) Source #

Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.

createTrail_snsTopicName :: Lens' CreateTrail (Maybe Text) Source #

Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.

createTrail_name :: Lens' CreateTrail Text Source #

Specifies the name of the trail. The name must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
  • Start with a letter or number, and end with a letter or number
  • Be between 3 and 128 characters
  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.
  • Not be in IP address format (for example, 192.168.5.4)

createTrail_s3BucketName :: Lens' CreateTrail Text Source #

Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.

createTrailResponse_cloudWatchLogsLogGroupArn :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.

createTrailResponse_cloudWatchLogsRoleArn :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

createTrailResponse_includeGlobalServiceEvents :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is publishing events from global services such as IAM to the log files.

createTrailResponse_isMultiRegionTrail :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether the trail exists in one region or in all regions.

createTrailResponse_isOrganizationTrail :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is an organization trail.

createTrailResponse_kmsKeyId :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

createTrailResponse_logFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether log file integrity validation is enabled.

createTrailResponse_name :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the name of the trail.

createTrailResponse_s3BucketName :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the name of the Amazon S3 bucket designated for publishing log files.

createTrailResponse_s3KeyPrefix :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files.

createTrailResponse_snsTopicARN :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:

arn:aws:sns:us-east-2:123456789012:MyTopic

createTrailResponse_snsTopicName :: Lens' CreateTrailResponse (Maybe Text) Source #

This field is no longer in use. Use SnsTopicARN.

createTrailResponse_trailARN :: Lens' CreateTrailResponse (Maybe Text) Source #

Specifies the ARN of the trail that was created. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

DeleteEventDataStore

deleteEventDataStore_eventDataStore :: Lens' DeleteEventDataStore Text Source #

The ARN (or the ID suffix of the ARN) of the event data store to delete.

DeleteTrail

deleteTrail_name :: Lens' DeleteTrail Text Source #

Specifies the name or the CloudTrail ARN of the trail to be deleted. The following is the format of a trail ARN. arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

DeregisterOrganizationDelegatedAdmin

deregisterOrganizationDelegatedAdmin_delegatedAdminAccountId :: Lens' DeregisterOrganizationDelegatedAdmin Text Source #

A delegated administrator account ID. This is a member account in an organization that is currently designated as a delegated administrator.

DescribeQuery

describeQuery_eventDataStore :: Lens' DescribeQuery (Maybe Text) Source #

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.

describeQueryResponse_deliveryS3Uri :: Lens' DescribeQueryResponse (Maybe Text) Source #

The URI for the S3 bucket where CloudTrail delivered query results, if applicable.

describeQueryResponse_errorMessage :: Lens' DescribeQueryResponse (Maybe Text) Source #

The error message returned if a query failed.

describeQueryResponse_queryStatistics :: Lens' DescribeQueryResponse (Maybe QueryStatisticsForDescribeQuery) Source #

Metadata about a query, including the number of events that were matched, the total number of events scanned, the query run time in milliseconds, and the query's creation time.

describeQueryResponse_queryStatus :: Lens' DescribeQueryResponse (Maybe QueryStatus) Source #

The status of a query. Values for QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED

DescribeTrails

describeTrails_includeShadowTrails :: Lens' DescribeTrails (Maybe Bool) Source #

Specifies whether to include shadow trails in the response. A shadow trail is the replication in a region of a trail that was created in a different region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and region replication trails will not be returned. The default is true.

describeTrails_trailNameList :: Lens' DescribeTrails (Maybe [Text]) Source #

Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

If an empty list is specified, information for the trail in the current region is returned.

  • If an empty list is specified and IncludeShadowTrails is false, then information for all trails in the current region is returned.
  • If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current region and any associated shadow trails in other regions is returned.

If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current region. To return information about a trail in another region, you must specify its trail ARN.

describeTrailsResponse_trailList :: Lens' DescribeTrailsResponse (Maybe [Trail]) Source #

The list of trail objects. Trail objects with string values are only returned if values for the objects exist in a trail's configuration. For example, SNSTopicName and SNSTopicARN are only returned in results if a trail is configured to send SNS notifications. Similarly, KMSKeyId only appears in results if a trail's log files are encrypted with KMS customer managed keys.

GetChannel

getChannel_channel :: Lens' GetChannel Text Source #

The ARN or UUID of a channel.

getChannelResponse_channelArn :: Lens' GetChannelResponse (Maybe Text) Source #

The ARN of an channel returned by a GetChannel request.

getChannelResponse_destinations :: Lens' GetChannelResponse (Maybe (NonEmpty Destination)) Source #

The Amazon Web Services service that created the service-linked channel.

getChannelResponse_name :: Lens' GetChannelResponse (Maybe Text) Source #

The name of the CloudTrail channel. For service-linked channels, the value is aws-service-channel/service-name/custom-suffix where service-name represents the name of the Amazon Web Services service that created the channel and custom-suffix represents the suffix generated by the Amazon Web Services service.

getChannelResponse_source :: Lens' GetChannelResponse (Maybe Text) Source #

The event source for the CloudTrail channel.

getChannelResponse_sourceConfig :: Lens' GetChannelResponse (Maybe SourceConfig) Source #

Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all regions or a single region.

GetEventDataStore

getEventDataStore_eventDataStore :: Lens' GetEventDataStore Text Source #

The ARN (or ID suffix of the ARN) of the event data store about which you want information.

getEventDataStoreResponse_advancedEventSelectors :: Lens' GetEventDataStoreResponse (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors used to select events for the data store.

getEventDataStoreResponse_eventDataStoreArn :: Lens' GetEventDataStoreResponse (Maybe Text) Source #

The event data store Amazon Resource Number (ARN).

getEventDataStoreResponse_kmsKeyId :: Lens' GetEventDataStoreResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

getEventDataStoreResponse_multiRegionEnabled :: Lens' GetEventDataStoreResponse (Maybe Bool) Source #

Indicates whether the event data store includes events from all regions, or only from the region in which it was created.

getEventDataStoreResponse_organizationEnabled :: Lens' GetEventDataStoreResponse (Maybe Bool) Source #

Indicates whether an event data store is collecting logged events for an organization in Organizations.

getEventDataStoreResponse_retentionPeriod :: Lens' GetEventDataStoreResponse (Maybe Natural) Source #

The retention period of the event data store, in days.

getEventDataStoreResponse_status :: Lens' GetEventDataStoreResponse (Maybe EventDataStoreStatus) Source #

The status of an event data store. Values can be ENABLED and PENDING_DELETION.

getEventDataStoreResponse_updatedTimestamp :: Lens' GetEventDataStoreResponse (Maybe UTCTime) Source #

Shows the time that an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

GetEventSelectors

getEventSelectors_trailName :: Lens' GetEventSelectors Text Source #

Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
  • Start with a letter or number, and end with a letter or number
  • Be between 3 and 128 characters
  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.
  • Not be in IP address format (for example, 192.168.5.4)

If you specify a trail ARN, it must be in the format:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

getEventSelectorsResponse_advancedEventSelectors :: Lens' GetEventSelectorsResponse (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors that are configured for the trail.

getEventSelectorsResponse_eventSelectors :: Lens' GetEventSelectorsResponse (Maybe [EventSelector]) Source #

The event selectors that are configured for the trail.

getEventSelectorsResponse_trailARN :: Lens' GetEventSelectorsResponse (Maybe Text) Source #

The specified trail ARN that has the event selectors.

GetImport

getImport_importId :: Lens' GetImport Text Source #

The ID for the import.

getImportResponse_createdTimestamp :: Lens' GetImportResponse (Maybe UTCTime) Source #

The timestamp of the import's creation.

getImportResponse_destinations :: Lens' GetImportResponse (Maybe (NonEmpty Text)) Source #

The ARN of the destination event data store.

getImportResponse_endEventTime :: Lens' GetImportResponse (Maybe UTCTime) Source #

Used with StartEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

getImportResponse_importStatistics :: Lens' GetImportResponse (Maybe ImportStatistics) Source #

Provides statistics for the import. CloudTrail does not update import statistics in real-time. Returned values for parameters such as EventsCompleted may be lower than the actual value, because CloudTrail updates statistics incrementally over the course of the import.

getImportResponse_startEventTime :: Lens' GetImportResponse (Maybe UTCTime) Source #

Used with EndEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

getImportResponse_updatedTimestamp :: Lens' GetImportResponse (Maybe UTCTime) Source #

The timestamp of when the import was updated.

getImportResponse_httpStatus :: Lens' GetImportResponse Int Source #

The response's http status code.

GetInsightSelectors

getInsightSelectors_trailName :: Lens' GetInsightSelectors Text Source #

Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
  • Start with a letter or number, and end with a letter or number
  • Be between 3 and 128 characters
  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.
  • Not be in IP address format (for example, 192.168.5.4)

If you specify a trail ARN, it must be in the format:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

getInsightSelectorsResponse_insightSelectors :: Lens' GetInsightSelectorsResponse (Maybe [InsightSelector]) Source #

A JSON string that contains the insight types you want to log on a trail. In this release, ApiErrorRateInsight and ApiCallRateInsight are supported as insight types.

getInsightSelectorsResponse_trailARN :: Lens' GetInsightSelectorsResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of a trail for which you want to get Insights selectors.

GetQueryResults

getQueryResults_eventDataStore :: Lens' GetQueryResults (Maybe Text) Source #

The ARN (or ID suffix of the ARN) of the event data store against which the query was run.

getQueryResults_maxQueryResults :: Lens' GetQueryResults (Maybe Natural) Source #

The maximum number of query results to display on a single page.

getQueryResults_nextToken :: Lens' GetQueryResults (Maybe Text) Source #

A token you can use to get the next page of query results.

getQueryResults_queryId :: Lens' GetQueryResults Text Source #

The ID of the query for which you want to get results.

getQueryResultsResponse_errorMessage :: Lens' GetQueryResultsResponse (Maybe Text) Source #

The error message returned if a query failed.

getQueryResultsResponse_nextToken :: Lens' GetQueryResultsResponse (Maybe Text) Source #

A token you can use to get the next page of query results.

getQueryResultsResponse_queryResultRows :: Lens' GetQueryResultsResponse (Maybe [[HashMap Text Text]]) Source #

Contains the individual event results of the query.

getQueryResultsResponse_queryStatus :: Lens' GetQueryResultsResponse (Maybe QueryStatus) Source #

The status of the query. Values include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.

GetTrail

getTrail_name :: Lens' GetTrail Text Source #

The name or the Amazon Resource Name (ARN) of the trail for which you want to retrieve settings information.

getTrailResponse_httpStatus :: Lens' GetTrailResponse Int Source #

The response's http status code.

GetTrailStatus

getTrailStatus_name :: Lens' GetTrailStatus Text Source #

Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another region), you must specify its ARN. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

getTrailStatusResponse_isLogging :: Lens' GetTrailStatusResponse (Maybe Bool) Source #

Whether the CloudTrail trail is currently logging Amazon Web Services API calls.

getTrailStatusResponse_latestCloudWatchLogsDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

getTrailStatusResponse_latestCloudWatchLogsDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

getTrailStatusResponse_latestDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

getTrailStatusResponse_latestDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

getTrailStatusResponse_latestDigestDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

getTrailStatusResponse_latestDigestDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket.

getTrailStatusResponse_latestNotificationError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

getTrailStatusResponse_latestNotificationTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

getTrailStatusResponse_startLoggingTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the most recent date and time when CloudTrail started recording API calls for an Amazon Web Services account.

getTrailStatusResponse_stopLoggingTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the most recent date and time when CloudTrail stopped recording API calls for an Amazon Web Services account.

ListChannels

listChannels_maxResults :: Lens' ListChannels (Maybe Natural) Source #

The maximum number of CloudTrail channels to display on a single page.

listChannels_nextToken :: Lens' ListChannels (Maybe Text) Source #

The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

listChannelsResponse_channels :: Lens' ListChannelsResponse (Maybe [Channel]) Source #

The list of channels in the account.

listChannelsResponse_nextToken :: Lens' ListChannelsResponse (Maybe Text) Source #

The token to use to get the next page of results after a previous API call.

ListEventDataStores

listEventDataStores_maxResults :: Lens' ListEventDataStores (Maybe Natural) Source #

The maximum number of event data stores to display on a single page.

listEventDataStores_nextToken :: Lens' ListEventDataStores (Maybe Text) Source #

A token you can use to get the next page of event data store results.

listEventDataStoresResponse_eventDataStores :: Lens' ListEventDataStoresResponse (Maybe [EventDataStore]) Source #

Contains information about event data stores in the account, in the current region.

listEventDataStoresResponse_nextToken :: Lens' ListEventDataStoresResponse (Maybe Text) Source #

A token you can use to get the next page of results.

ListImportFailures

listImportFailures_maxResults :: Lens' ListImportFailures (Maybe Natural) Source #

The maximum number of failures to display on a single page.

listImportFailures_nextToken :: Lens' ListImportFailures (Maybe Text) Source #

A token you can use to get the next page of import failures.

listImportFailuresResponse_nextToken :: Lens' ListImportFailuresResponse (Maybe Text) Source #

A token you can use to get the next page of results.

ListImports

listImports_destination :: Lens' ListImports (Maybe Text) Source #

The ARN of the destination event data store.

listImports_maxResults :: Lens' ListImports (Maybe Natural) Source #

The maximum number of imports to display on a single page.

listImports_nextToken :: Lens' ListImports (Maybe Text) Source #

A token you can use to get the next page of import results.

listImportsResponse_nextToken :: Lens' ListImportsResponse (Maybe Text) Source #

A token you can use to get the next page of import results.

ListPublicKeys

listPublicKeys_endTime :: Lens' ListPublicKeys (Maybe UTCTime) Source #

Optionally specifies, in UTC, the end of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used.

listPublicKeys_startTime :: Lens' ListPublicKeys (Maybe UTCTime) Source #

Optionally specifies, in UTC, the start of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used, and the current public key is returned.

listPublicKeysResponse_publicKeyList :: Lens' ListPublicKeysResponse (Maybe [PublicKey]) Source #

Contains an array of PublicKey objects.

The returned public keys may have validity time ranges that overlap.

ListQueries

listQueries_endTime :: Lens' ListQueries (Maybe UTCTime) Source #

Use with StartTime to bound a ListQueries request, and limit its results to only those queries run within a specified time period.

listQueries_maxResults :: Lens' ListQueries (Maybe Natural) Source #

The maximum number of queries to show on a page.

listQueries_nextToken :: Lens' ListQueries (Maybe Text) Source #

A token you can use to get the next page of results.

listQueries_queryStatus :: Lens' ListQueries (Maybe QueryStatus) Source #

The status of queries that you want to return in results. Valid values for QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.

listQueries_startTime :: Lens' ListQueries (Maybe UTCTime) Source #

Use with EndTime to bound a ListQueries request, and limit its results to only those queries run within a specified time period.

listQueries_eventDataStore :: Lens' ListQueries Text Source #

The ARN (or the ID suffix of the ARN) of an event data store on which queries were run.

listQueriesResponse_nextToken :: Lens' ListQueriesResponse (Maybe Text) Source #

A token you can use to get the next page of results.

listQueriesResponse_queries :: Lens' ListQueriesResponse (Maybe [Query]) Source #

Lists matching query results, and shows query ID, status, and creation time of each query.

ListTags

listTags_nextToken :: Lens' ListTags (Maybe Text) Source #

Reserved for future use.

listTags_resourceIdList :: Lens' ListTags [Text] Source #

Specifies a list of trail and event data store ARNs whose tags will be listed. The list has a limit of 20 ARNs.

listTagsResponse_httpStatus :: Lens' ListTagsResponse Int Source #

The response's http status code.

ListTrails

listTrails_nextToken :: Lens' ListTrails (Maybe Text) Source #

The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

listTrailsResponse_nextToken :: Lens' ListTrailsResponse (Maybe Text) Source #

The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

listTrailsResponse_trails :: Lens' ListTrailsResponse (Maybe [TrailInfo]) Source #

Returns the name, ARN, and home region of trails in the current account.

LookupEvents

lookupEvents_endTime :: Lens' LookupEvents (Maybe UTCTime) Source #

Specifies that only events that occur before or at the specified time are returned. If the specified end time is before the specified start time, an error is returned.

lookupEvents_eventCategory :: Lens' LookupEvents (Maybe EventCategory) Source #

Specifies the event category. If you do not specify an event category, events of the category are not returned in the response. For example, if you do not specify insight as the value of EventCategory, no Insights events are returned.

lookupEvents_lookupAttributes :: Lens' LookupEvents (Maybe [LookupAttribute]) Source #

Contains a list of lookup attributes. Currently the list can contain only one item.

lookupEvents_maxResults :: Lens' LookupEvents (Maybe Natural) Source #

The number of events to return. Possible values are 1 through 50. The default is 50.

lookupEvents_nextToken :: Lens' LookupEvents (Maybe Text) Source #

The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

lookupEvents_startTime :: Lens' LookupEvents (Maybe UTCTime) Source #

Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned.

lookupEventsResponse_events :: Lens' LookupEventsResponse (Maybe [Event]) Source #

A list of events returned based on the lookup attributes specified and the CloudTrail event. The events list is sorted by time. The most recent event is listed first.

lookupEventsResponse_nextToken :: Lens' LookupEventsResponse (Maybe Text) Source #

The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

PutEventSelectors

putEventSelectors_advancedEventSelectors :: Lens' PutEventSelectors (Maybe [AdvancedEventSelector]) Source #

Specifies the settings for advanced event selectors. You can add advanced event selectors, and conditions for your advanced event selectors, up to a maximum of 500 values for all conditions and selectors on a trail. You can use either AdvancedEventSelectors or EventSelectors, but not both. If you apply AdvancedEventSelectors to a trail, any existing EventSelectors are overwritten. For more information about advanced event selectors, see Logging data events for trails in the CloudTrail User Guide.

putEventSelectors_eventSelectors :: Lens' PutEventSelectors (Maybe [EventSelector]) Source #

Specifies the settings for your event selectors. You can configure up to five event selectors for a trail. You can use either EventSelectors or AdvancedEventSelectors in a PutEventSelectors request, but not both. If you apply EventSelectors to a trail, any existing AdvancedEventSelectors are overwritten.

putEventSelectors_trailName :: Lens' PutEventSelectors Text Source #

Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
  • Start with a letter or number, and end with a letter or number
  • Be between 3 and 128 characters
  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.
  • Not be in IP address format (for example, 192.168.5.4)

If you specify a trail ARN, it must be in the following format.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

putEventSelectorsResponse_advancedEventSelectors :: Lens' PutEventSelectorsResponse (Maybe [AdvancedEventSelector]) Source #

Specifies the advanced event selectors configured for your trail.

putEventSelectorsResponse_eventSelectors :: Lens' PutEventSelectorsResponse (Maybe [EventSelector]) Source #

Specifies the event selectors configured for your trail.

putEventSelectorsResponse_trailARN :: Lens' PutEventSelectorsResponse (Maybe Text) Source #

Specifies the ARN of the trail that was updated with event selectors. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

PutInsightSelectors

putInsightSelectors_trailName :: Lens' PutInsightSelectors Text Source #

The name of the CloudTrail trail for which you want to change or add Insights selectors.

putInsightSelectors_insightSelectors :: Lens' PutInsightSelectors [InsightSelector] Source #

A JSON string that contains the insight types you want to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.

putInsightSelectorsResponse_insightSelectors :: Lens' PutInsightSelectorsResponse (Maybe [InsightSelector]) Source #

A JSON string that contains the Insights event types that you want to log on a trail. The valid Insights types in this release are ApiErrorRateInsight and ApiCallRateInsight.

putInsightSelectorsResponse_trailARN :: Lens' PutInsightSelectorsResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of a trail for which you want to change or add Insights selectors.

RegisterOrganizationDelegatedAdmin

registerOrganizationDelegatedAdmin_memberAccountId :: Lens' RegisterOrganizationDelegatedAdmin Text Source #

An organization member account ID that you want to designate as a delegated administrator.

RemoveTags

removeTags_resourceId :: Lens' RemoveTags Text Source #

Specifies the ARN of the trail or event data store from which tags should be removed.

Example trail ARN format: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

Example event data store ARN format: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE

removeTags_tagsList :: Lens' RemoveTags [Tag] Source #

Specifies a list of tags to be removed.

RestoreEventDataStore

restoreEventDataStore_eventDataStore :: Lens' RestoreEventDataStore Text Source #

The ARN (or the ID suffix of the ARN) of the event data store that you want to restore.

restoreEventDataStoreResponse_kmsKeyId :: Lens' RestoreEventDataStoreResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

restoreEventDataStoreResponse_multiRegionEnabled :: Lens' RestoreEventDataStoreResponse (Maybe Bool) Source #

Indicates whether the event data store is collecting events from all regions, or only from the region in which the event data store was created.

restoreEventDataStoreResponse_organizationEnabled :: Lens' RestoreEventDataStoreResponse (Maybe Bool) Source #

Indicates whether an event data store is collecting logged events for an organization in Organizations.

restoreEventDataStoreResponse_terminationProtectionEnabled :: Lens' RestoreEventDataStoreResponse (Maybe Bool) Source #

Indicates that termination protection is enabled and the event data store cannot be automatically deleted.

restoreEventDataStoreResponse_updatedTimestamp :: Lens' RestoreEventDataStoreResponse (Maybe UTCTime) Source #

The timestamp that shows when an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

StartImport

startImport_destinations :: Lens' StartImport (Maybe (NonEmpty Text)) Source #

The ARN of the destination event data store. Use this parameter for a new import.

startImport_endEventTime :: Lens' StartImport (Maybe UTCTime) Source #

Use with StartEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified StartEventTime and EndEventTime before attempting to import events.

startImport_importId :: Lens' StartImport (Maybe Text) Source #

The ID of the import. Use this parameter when you are retrying an import.

startImport_importSource :: Lens' StartImport (Maybe ImportSource) Source #

The source S3 bucket for the import. Use this parameter for a new import.

startImport_startEventTime :: Lens' StartImport (Maybe UTCTime) Source #

Use with EndEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified StartEventTime and EndEventTime before attempting to import events.

startImportResponse_destinations :: Lens' StartImportResponse (Maybe (NonEmpty Text)) Source #

The ARN of the destination event data store.

startImportResponse_endEventTime :: Lens' StartImportResponse (Maybe UTCTime) Source #

Used with StartEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

startImportResponse_importStatus :: Lens' StartImportResponse (Maybe ImportStatus) Source #

Shows the status of the import after a StartImport request. An import finishes with a status of COMPLETED if there were no failures, or FAILED if there were failures.

startImportResponse_startEventTime :: Lens' StartImportResponse (Maybe UTCTime) Source #

Used with EndEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

startImportResponse_updatedTimestamp :: Lens' StartImportResponse (Maybe UTCTime) Source #

The timestamp of the import's last update, if applicable.

StartLogging

startLogging_name :: Lens' StartLogging Text Source #

Specifies the name or the CloudTrail ARN of the trail for which CloudTrail logs Amazon Web Services API calls. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

StartQuery

startQuery_deliveryS3Uri :: Lens' StartQuery (Maybe Text) Source #

The URI for the S3 bucket where CloudTrail delivers the query results.

startQuery_queryStatement :: Lens' StartQuery Text Source #

The SQL code of your query.

StopImport

stopImportResponse_destinations :: Lens' StopImportResponse (Maybe (NonEmpty Text)) Source #

The ARN of the destination event data store.

stopImportResponse_endEventTime :: Lens' StopImportResponse (Maybe UTCTime) Source #

Used with StartEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

stopImportResponse_startEventTime :: Lens' StopImportResponse (Maybe UTCTime) Source #

Used with EndEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

stopImportResponse_updatedTimestamp :: Lens' StopImportResponse (Maybe UTCTime) Source #

The timestamp of the import's last update.

StopLogging

stopLogging_name :: Lens' StopLogging Text Source #

Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

UpdateEventDataStore

updateEventDataStore_advancedEventSelectors :: Lens' UpdateEventDataStore (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors used to select events for the event data store. You can configure up to five advanced event selectors for each event data store.

updateEventDataStore_kmsKeyId :: Lens' UpdateEventDataStore (Maybe Text) Source #

Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by alias/, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.

Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.

CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.

Examples:

  • alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  • 12345678-1234-1234-1234-123456789012

updateEventDataStore_multiRegionEnabled :: Lens' UpdateEventDataStore (Maybe Bool) Source #

Specifies whether an event data store collects events from all regions, or only from the region in which it was created.

updateEventDataStore_organizationEnabled :: Lens' UpdateEventDataStore (Maybe Bool) Source #

Specifies whether an event data store collects events logged for an organization in Organizations.

updateEventDataStore_terminationProtectionEnabled :: Lens' UpdateEventDataStore (Maybe Bool) Source #

Indicates that termination protection is enabled and the event data store cannot be automatically deleted.

updateEventDataStore_eventDataStore :: Lens' UpdateEventDataStore Text Source #

The ARN (or the ID suffix of the ARN) of the event data store that you want to update.

updateEventDataStoreResponse_advancedEventSelectors :: Lens' UpdateEventDataStoreResponse (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors that are applied to the event data store.

updateEventDataStoreResponse_createdTimestamp :: Lens' UpdateEventDataStoreResponse (Maybe UTCTime) Source #

The timestamp that shows when an event data store was first created.

updateEventDataStoreResponse_kmsKeyId :: Lens' UpdateEventDataStoreResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

updateEventDataStoreResponse_multiRegionEnabled :: Lens' UpdateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether the event data store includes events from all regions, or only from the region in which it was created.

updateEventDataStoreResponse_organizationEnabled :: Lens' UpdateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether an event data store is collecting logged events for an organization in Organizations.

updateEventDataStoreResponse_status :: Lens' UpdateEventDataStoreResponse (Maybe EventDataStoreStatus) Source #

The status of an event data store. Values can be ENABLED and PENDING_DELETION.

updateEventDataStoreResponse_terminationProtectionEnabled :: Lens' UpdateEventDataStoreResponse (Maybe Bool) Source #

Indicates whether termination protection is enabled for the event data store.

updateEventDataStoreResponse_updatedTimestamp :: Lens' UpdateEventDataStoreResponse (Maybe UTCTime) Source #

The timestamp that shows when the event data store was last updated. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

UpdateTrail

updateTrail_cloudWatchLogsLogGroupArn :: Lens' UpdateTrail (Maybe Text) Source #

Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs are delivered. Not required unless you specify CloudWatchLogsRoleArn.

updateTrail_cloudWatchLogsRoleArn :: Lens' UpdateTrail (Maybe Text) Source #

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

updateTrail_enableLogFileValidation :: Lens' UpdateTrail (Maybe Bool) Source #

Specifies whether log file validation is enabled. The default is false.

When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.

updateTrail_includeGlobalServiceEvents :: Lens' UpdateTrail (Maybe Bool) Source #

Specifies whether the trail is publishing events from global services such as IAM to the log files.

updateTrail_isMultiRegionTrail :: Lens' UpdateTrail (Maybe Bool) Source #

Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.

updateTrail_isOrganizationTrail :: Lens' UpdateTrail (Maybe Bool) Source #

Specifies whether the trail is applied to all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in Organizations. If the trail is not an organization trail and this is set to true, the trail will be created in all Amazon Web Services accounts that belong to the organization. If the trail is an organization trail and this is set to false, the trail will remain in the current Amazon Web Services account but be deleted from all member accounts in the organization.

updateTrail_kmsKeyId :: Lens' UpdateTrail (Maybe Text) Source #

Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.

CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.

Examples:

  • alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  • arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  • 12345678-1234-1234-1234-123456789012

updateTrail_s3BucketName :: Lens' UpdateTrail (Maybe Text) Source #

Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.

updateTrail_s3KeyPrefix :: Lens' UpdateTrail (Maybe Text) Source #

Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.

updateTrail_snsTopicName :: Lens' UpdateTrail (Maybe Text) Source #

Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.

updateTrail_name :: Lens' UpdateTrail Text Source #

Specifies the name of the trail or trail ARN. If Name is a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
  • Start with a letter or number, and end with a letter or number
  • Be between 3 and 128 characters
  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.
  • Not be in IP address format (for example, 192.168.5.4)

If Name is a trail ARN, it must be in the following format.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

updateTrailResponse_cloudWatchLogsLogGroupArn :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs are delivered.

updateTrailResponse_cloudWatchLogsRoleArn :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

updateTrailResponse_includeGlobalServiceEvents :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is publishing events from global services such as IAM to the log files.

updateTrailResponse_isMultiRegionTrail :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether the trail exists in one region or in all regions.

updateTrailResponse_isOrganizationTrail :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is an organization trail.

updateTrailResponse_kmsKeyId :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

updateTrailResponse_logFileValidationEnabled :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether log file integrity validation is enabled.

updateTrailResponse_name :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the name of the trail.

updateTrailResponse_s3BucketName :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the name of the Amazon S3 bucket designated for publishing log files.

updateTrailResponse_s3KeyPrefix :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your IAM Log Files.

updateTrailResponse_snsTopicARN :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.

arn:aws:sns:us-east-2:123456789012:MyTopic

updateTrailResponse_snsTopicName :: Lens' UpdateTrailResponse (Maybe Text) Source #

This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.

updateTrailResponse_trailARN :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the ARN of the trail that was updated. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

Types

AdvancedEventSelector

advancedEventSelector_name :: Lens' AdvancedEventSelector (Maybe Text) Source #

An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".

advancedEventSelector_fieldSelectors :: Lens' AdvancedEventSelector (NonEmpty AdvancedFieldSelector) Source #

Contains all selector statements in an advanced event selector.

AdvancedFieldSelector

advancedFieldSelector_endsWith :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that includes events that match the last few characters of the event record field specified as the value of Field.

advancedFieldSelector_equals :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that includes events that match the exact value of the event record field specified as the value of Field. This is the only valid operator that you can use with the readOnly, eventCategory, and resources.type fields.

advancedFieldSelector_notEndsWith :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that excludes events that match the last few characters of the event record field specified as the value of Field.

advancedFieldSelector_notEquals :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that excludes events that match the exact value of the event record field specified as the value of Field.

advancedFieldSelector_notStartsWith :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that excludes events that match the first few characters of the event record field specified as the value of Field.

advancedFieldSelector_startsWith :: Lens' AdvancedFieldSelector (Maybe (NonEmpty Text)) Source #

An operator that includes events that match the first few characters of the event record field specified as the value of Field.

advancedFieldSelector_field :: Lens' AdvancedFieldSelector Text Source #

A field in an event record on which to filter events to be logged. Supported fields include readOnly, eventCategory, eventSource (for management events), eventName, resources.type, and resources.ARN.

  • readOnly - Optional. Can be set to Equals a value of true or false. If you do not add this field, CloudTrail logs both read and write events. A value of true logs only read events. A value of false logs only write events.
  • eventSource - For filtering management events only. This can be set only to NotEquals kms.amazonaws.com.
  • eventName - Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock. You can have multiple values for this field, separated by commas.
  • eventCategory - This is required. It must be set to Equals, and the value must be Management or Data.
  • resources.type - This field is required. resources.type can only use the Equals operator, and the value can be one of the following:

    • AWS::S3::Object
    • AWS::Lambda::Function
    • AWS::DynamoDB::Table
    • AWS::S3Outposts::Object
    • AWS::ManagedBlockchain::Node
    • AWS::S3ObjectLambda::AccessPoint
    • AWS::EC2::Snapshot
    • AWS::S3::AccessPoint
    • AWS::DynamoDB::Stream
    • AWS::Glue::Table

    You can have only one resources.type field per selector. To log data events on more than one resource type, add another selector.

  • resources.ARN - You can use any operator with resources.ARN, but if you use Equals or NotEquals, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type. For example, if resources.type equals AWS::S3::Object, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use the StartsWith operator, and include only the bucket ARN as the matching value.

    The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.

    • arn:<partition>:s3:::<bucket_name>/
    • arn:<partition>:s3:::<bucket_name>/<object_path>/

    When resources.type equals AWS::S3::AccessPoint, and the operator is set to Equals or NotEquals, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use the StartsWith or NotStartsWith operators.

    • arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
    • arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>

    When resources.type equals AWS::Lambda::Function, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>

    When resources.type equals AWS::DynamoDB::Table, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>

    When resources.type equals AWS::S3Outposts::Object, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>

    When resources.type equals AWS::ManagedBlockchain::Node, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>

    When resources.type equals AWS::S3ObjectLambda::AccessPoint, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>

    When resources.type equals AWS::EC2::Snapshot, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>

    When resources.type equals AWS::DynamoDB::Stream, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>

    When resources.type equals AWS::Glue::Table, and the operator is set to Equals or NotEquals, the ARN must be in the following format:

    • arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>

Channel

channel_channelArn :: Lens' Channel (Maybe Text) Source #

The Amazon Resource Name (ARN) of a channel.

channel_name :: Lens' Channel (Maybe Text) Source #

The name of the CloudTrail channel. For service-linked channels, the name is aws-service-channel/service-name/custom-suffix where service-name represents the name of the Amazon Web Services service that created the channel and custom-suffix represents the suffix created by the Amazon Web Services service.

DataResource

dataResource_type :: Lens' DataResource (Maybe Text) Source #

The resource type in which you want to log data events. You can specify the following basic event selector resource types:

  • AWS::S3::Object
  • AWS::Lambda::Function
  • AWS::DynamoDB::Table

The following resource types are also available through advanced event selectors. Basic event selector resource types are valid in advanced event selectors, but advanced event selector resource types are not valid in basic event selectors. For more information, see AdvancedFieldSelector$Field.

  • AWS::S3Outposts::Object
  • AWS::ManagedBlockchain::Node
  • AWS::S3ObjectLambda::AccessPoint
  • AWS::EC2::Snapshot
  • AWS::S3::AccessPoint
  • AWS::DynamoDB::Stream
  • AWS::Glue::Table

dataResource_values :: Lens' DataResource (Maybe [Text]) Source #

An array of Amazon Resource Name (ARN) strings or partial ARN strings for the specified objects.

  • To log data events for all objects in all S3 buckets in your Amazon Web Services account, specify the prefix as arn:aws:s3.

    This also enables logging of data event activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a bucket that belongs to another Amazon Web Services account.

  • To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs data events for all objects in this S3 bucket.
  • To log data events for specific objects, specify the S3 bucket and object prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data events for objects in this S3 bucket that match the prefix.
  • To log data events for all Lambda functions in your Amazon Web Services account, specify the prefix as arn:aws:lambda.

    This also enables logging of Invoke activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a function that belongs to another Amazon Web Services account.

  • To log data events for a specific Lambda function, specify the function ARN.

    Lambda function ARNs are exact. For example, if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.

  • To log data events for all DynamoDB tables in your Amazon Web Services account, specify the prefix as arn:aws:dynamodb.

Destination

destination_type :: Lens' Destination DestinationType Source #

The type of destination for events arriving from a channel. For service-linked channels, the value is AWS_SERVICE.

destination_location :: Lens' Destination Text Source #

For service-linked channels, the value is the name of the Amazon Web Services service.

Event

event_accessKeyId :: Lens' Event (Maybe Text) Source #

The Amazon Web Services access key ID that was used to sign the request. If the request was made with temporary security credentials, this is the access key ID of the temporary credentials.

event_cloudTrailEvent :: Lens' Event (Maybe Text) Source #

A JSON string that contains a representation of the event returned.

event_eventId :: Lens' Event (Maybe Text) Source #

The CloudTrail ID of the event returned.

event_eventName :: Lens' Event (Maybe Text) Source #

The name of the event returned.

event_eventSource :: Lens' Event (Maybe Text) Source #

The Amazon Web Services service to which the request was made.

event_eventTime :: Lens' Event (Maybe UTCTime) Source #

The date and time of the event returned.

event_readOnly :: Lens' Event (Maybe Text) Source #

Information about whether the event is a write event or a read event.

event_resources :: Lens' Event (Maybe [Resource]) Source #

A list of resources referenced by the event returned.

event_username :: Lens' Event (Maybe Text) Source #

A user name or role name of the requester that called the API in the event returned.

EventDataStore

eventDataStore_advancedEventSelectors :: Lens' EventDataStore (Maybe [AdvancedEventSelector]) Source #

This field is being deprecated. The advanced event selectors that were used to select events for the data store.

eventDataStore_createdTimestamp :: Lens' EventDataStore (Maybe UTCTime) Source #

This field is being deprecated. The timestamp of the event data store's creation.

eventDataStore_multiRegionEnabled :: Lens' EventDataStore (Maybe Bool) Source #

This field is being deprecated. Indicates whether the event data store includes events from all regions, or only from the region in which it was created.

eventDataStore_name :: Lens' EventDataStore (Maybe Text) Source #

The name of the event data store.

eventDataStore_organizationEnabled :: Lens' EventDataStore (Maybe Bool) Source #

This field is being deprecated. Indicates that an event data store is collecting logged events for an organization.

eventDataStore_retentionPeriod :: Lens' EventDataStore (Maybe Natural) Source #

This field is being deprecated. The retention period, in days.

eventDataStore_status :: Lens' EventDataStore (Maybe EventDataStoreStatus) Source #

This field is being deprecated. The status of an event data store. Values are ENABLED and PENDING_DELETION.

eventDataStore_terminationProtectionEnabled :: Lens' EventDataStore (Maybe Bool) Source #

This field is being deprecated. Indicates whether the event data store is protected from termination.

eventDataStore_updatedTimestamp :: Lens' EventDataStore (Maybe UTCTime) Source #

This field is being deprecated. The timestamp showing when an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

EventSelector

eventSelector_dataResources :: Lens' EventSelector (Maybe [DataResource]) Source #

CloudTrail supports data event logging for Amazon S3 objects, Lambda functions, and Amazon DynamoDB tables with basic event selectors. You can specify up to 250 resources for an individual event selector, but the total number of data resources cannot exceed 250 across all event selectors in a trail. This limit does not apply if you configure resource logging for all data events.

For more information, see Data Events and Limits in CloudTrail in the CloudTrail User Guide.

eventSelector_excludeManagementEventSources :: Lens' EventSelector (Maybe [Text]) Source #

An optional list of service event sources from which you do not want management events to be logged on your trail. In this release, the list can be empty (disables the filter), or it can filter out Key Management Service or Amazon RDS Data API events by containing kms.amazonaws.com or rdsdata.amazonaws.com. By default, ExcludeManagementEventSources is empty, and KMS and Amazon RDS Data API events are logged to your trail. You can exclude management event sources only in regions that support the event source.

eventSelector_includeManagementEvents :: Lens' EventSelector (Maybe Bool) Source #

Specify if you want your event selector to include management events for your trail.

For more information, see Management Events in the CloudTrail User Guide.

By default, the value is true.

The first copy of management events is free. You are charged for additional copies of management events that you are logging on any subsequent trail in the same region. For more information about CloudTrail pricing, see CloudTrail Pricing.

eventSelector_readWriteType :: Lens' EventSelector (Maybe ReadWriteType) Source #

Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2 GetConsoleOutput is a read-only API operation and RunInstances is a write-only API operation.

By default, the value is All.

ImportFailureListItem

importFailureListItem_location :: Lens' ImportFailureListItem (Maybe Text) Source #

The location of the failure in the S3 bucket.

ImportSource

ImportStatistics

importStatistics_eventsCompleted :: Lens' ImportStatistics (Maybe Integer) Source #

The number of trail events imported into the event data store.

importStatistics_filesCompleted :: Lens' ImportStatistics (Maybe Integer) Source #

The number of log files that completed import.

importStatistics_prefixesCompleted :: Lens' ImportStatistics (Maybe Integer) Source #

The number of S3 prefixes that completed import.

importStatistics_prefixesFound :: Lens' ImportStatistics (Maybe Integer) Source #

The number of S3 prefixes found for the import.

ImportsListItem

importsListItem_createdTimestamp :: Lens' ImportsListItem (Maybe UTCTime) Source #

The timestamp of the import's creation.

importsListItem_destinations :: Lens' ImportsListItem (Maybe (NonEmpty Text)) Source #

The ARN of the destination event data store.

importsListItem_updatedTimestamp :: Lens' ImportsListItem (Maybe UTCTime) Source #

The timestamp of the import's last update.

InsightSelector

insightSelector_insightType :: Lens' InsightSelector (Maybe InsightType) Source #

The type of insights to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.

LookupAttribute

lookupAttribute_attributeKey :: Lens' LookupAttribute LookupAttributeKey Source #

Specifies an attribute on which to filter the events returned.

lookupAttribute_attributeValue :: Lens' LookupAttribute Text Source #

Specifies a value for the specified AttributeKey.

PublicKey

publicKey_fingerprint :: Lens' PublicKey (Maybe Text) Source #

The fingerprint of the public key.

publicKey_validityEndTime :: Lens' PublicKey (Maybe UTCTime) Source #

The ending time of validity of the public key.

publicKey_validityStartTime :: Lens' PublicKey (Maybe UTCTime) Source #

The starting time of validity of the public key.

publicKey_value :: Lens' PublicKey (Maybe ByteString) Source #

The DER encoded public key value in PKCS#1 format.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

Query

query_creationTime :: Lens' Query (Maybe UTCTime) Source #

The creation time of a query.

query_queryId :: Lens' Query (Maybe Text) Source #

The ID of a query.

query_queryStatus :: Lens' Query (Maybe QueryStatus) Source #

The status of the query. This can be QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.

QueryStatistics

queryStatistics_bytesScanned :: Lens' QueryStatistics (Maybe Integer) Source #

The total bytes that the query scanned in the event data store. This value matches the number of bytes for which your account is billed for the query, unless the query is still running.

queryStatistics_resultsCount :: Lens' QueryStatistics (Maybe Int) Source #

The number of results returned.

queryStatistics_totalResultsCount :: Lens' QueryStatistics (Maybe Int) Source #

The total number of results returned by a query.

QueryStatisticsForDescribeQuery

queryStatisticsForDescribeQuery_bytesScanned :: Lens' QueryStatisticsForDescribeQuery (Maybe Integer) Source #

The total bytes that the query scanned in the event data store. This value matches the number of bytes for which your account is billed for the query, unless the query is still running.

queryStatisticsForDescribeQuery_eventsScanned :: Lens' QueryStatisticsForDescribeQuery (Maybe Integer) Source #

The number of events that the query scanned in the event data store.

Resource

resource_resourceName :: Lens' Resource (Maybe Text) Source #

The name of the resource referenced by the event returned. These are user-created names whose values will depend on the environment. For example, the resource name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" for an EC2 Instance.

resource_resourceType :: Lens' Resource (Maybe Text) Source #

The type of a resource referenced by the event returned. When the resource type cannot be determined, null is returned. Some examples of resource types are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and AccessKey for IAM. To learn more about how to look up and filter events by the resource types supported for a service, see Filtering CloudTrail Events.

ResourceTag

resourceTag_resourceId :: Lens' ResourceTag (Maybe Text) Source #

Specifies the ARN of the resource.

S3ImportSource

s3ImportSource_s3LocationUri :: Lens' S3ImportSource Text Source #

The URI for the source S3 bucket.

s3ImportSource_s3BucketRegion :: Lens' S3ImportSource Text Source #

The region associated with the source S3 bucket.

s3ImportSource_s3BucketAccessRoleArn :: Lens' S3ImportSource Text Source #

The IAM ARN role used to access the source S3 bucket.

SourceConfig

sourceConfig_advancedEventSelectors :: Lens' SourceConfig (Maybe [AdvancedEventSelector]) Source #

The advanced event selectors that are configured for the channel.

sourceConfig_applyToAllRegions :: Lens' SourceConfig (Maybe Bool) Source #

Specifies whether the channel applies to a single region or to all regions.

Tag

tag_value :: Lens' Tag (Maybe Text) Source #

The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.

tag_key :: Lens' Tag Text Source #

The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

Trail

trail_cloudWatchLogsLogGroupArn :: Lens' Trail (Maybe Text) Source #

Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.

trail_cloudWatchLogsRoleArn :: Lens' Trail (Maybe Text) Source #

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

trail_hasCustomEventSelectors :: Lens' Trail (Maybe Bool) Source #

Specifies if the trail has custom event selectors.

trail_hasInsightSelectors :: Lens' Trail (Maybe Bool) Source #

Specifies whether a trail has insight types specified in an InsightSelector list.

trail_homeRegion :: Lens' Trail (Maybe Text) Source #

The region in which the trail was created.

trail_includeGlobalServiceEvents :: Lens' Trail (Maybe Bool) Source #

Set to True to include Amazon Web Services API calls from Amazon Web Services global services such as IAM. Otherwise, False.

trail_isMultiRegionTrail :: Lens' Trail (Maybe Bool) Source #

Specifies whether the trail exists only in one region or exists in all regions.

trail_isOrganizationTrail :: Lens' Trail (Maybe Bool) Source #

Specifies whether the trail is an organization trail.

trail_kmsKeyId :: Lens' Trail (Maybe Text) Source #

Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012

trail_logFileValidationEnabled :: Lens' Trail (Maybe Bool) Source #

Specifies whether log file validation is enabled.

trail_name :: Lens' Trail (Maybe Text) Source #

Name of the trail set by calling CreateTrail. The maximum length is 128 characters.

trail_s3BucketName :: Lens' Trail (Maybe Text) Source #

Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.

trail_s3KeyPrefix :: Lens' Trail (Maybe Text) Source #

Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.

trail_snsTopicARN :: Lens' Trail (Maybe Text) Source #

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.

arn:aws:sns:us-east-2:123456789012:MyTopic

trail_snsTopicName :: Lens' Trail (Maybe Text) Source #

This field is no longer in use. Use SnsTopicARN.

trail_trailARN :: Lens' Trail (Maybe Text) Source #

Specifies the ARN of the trail. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

TrailInfo

trailInfo_homeRegion :: Lens' TrailInfo (Maybe Text) Source #

The Amazon Web Services Region in which a trail was created.

trailInfo_name :: Lens' TrailInfo (Maybe Text) Source #

The name of a trail.