libZSservicesZSamazonka-cloudtrailZSamazonka-cloudtrail
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudTrail.Lens

Description

 
Synopsis

Operations

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.

ListPublicKeys

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.

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.

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

Contains an array of PublicKey objects.

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

RemoveTags

removeTags_tagsList :: Lens' RemoveTags (Maybe [Tag]) Source #

Specifies a list of tags to be removed.

removeTags_resourceId :: Lens' RemoveTags Text Source #

Specifies the ARN of the trail from which tags should be removed. The format of a trail ARN is:

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

LookupEvents

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_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.

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

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

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 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_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_maxResults :: Lens' LookupEvents (Maybe Natural) Source #

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

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.

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.

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

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

UpdateTrail

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_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_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_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_includeGlobalServiceEvents :: Lens' UpdateTrail (Maybe Bool) Source #

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

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_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_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_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_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_logFileValidationEnabled :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether log file integrity validation is enabled.

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

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_cloudWatchLogsLogGroupArn :: Lens' UpdateTrailResponse (Maybe Text) Source #

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

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_name :: Lens' UpdateTrailResponse (Maybe Text) Source #

Specifies the name of the trail.

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_isOrganizationTrail :: Lens' UpdateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is an organization trail.

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_s3BucketName :: Lens' UpdateTrailResponse (Maybe Text) Source #

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

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

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

CreateTrail

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_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_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_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_includeGlobalServiceEvents :: Lens' CreateTrail (Maybe Bool) Source #

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

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_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_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_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_logFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether log file integrity validation is enabled.

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

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_cloudWatchLogsLogGroupArn :: Lens' CreateTrailResponse (Maybe Text) Source #

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

createTrailResponse_kmsKeyId :: Lens' CreateTrailResponse (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

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

Specifies the name of the trail.

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_isOrganizationTrail :: Lens' CreateTrailResponse (Maybe Bool) Source #

Specifies whether the trail is an organization trail.

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_s3BucketName :: Lens' CreateTrailResponse (Maybe Text) Source #

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

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

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

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 Insights types that you want to log on a trail. The valid Insights type in this release is 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.

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 type in this release is ApiCallRateInsight.

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_trailARN :: Lens' GetEventSelectorsResponse (Maybe Text) Source #

The specified trail ARN that has the event selectors.

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

The event selectors that are configured for the trail.

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

The advanced event selectors that are configured for the trail.

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_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_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_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_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_isLogging :: Lens' GetTrailStatusResponse (Maybe Bool) Source #

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

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_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_latestCloudWatchLogsDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

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

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

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

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_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.

AddTags

addTags_tagsList :: Lens' AddTags (Maybe [Tag]) Source #

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

addTags_resourceId :: Lens' AddTags Text Source #

Specifies the ARN of the trail 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

addTagsResponse_httpStatus :: Lens' AddTagsResponse Int Source #

The response's http status code.

ListTags

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

Reserved for future use.

listTags_resourceIdList :: Lens' ListTags [Text] Source #

Specifies a list of trail ARNs whose tags will be listed. The list has a limit of 20 ARNs. The following is the format of a trail ARN.

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

listTagsResponse_httpStatus :: Lens' ListTagsResponse Int Source #

The response's http status code.

PutEventSelectors

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_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_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_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

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

Specifies the event selectors configured for your trail.

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

Specifies the advanced event selectors configured for your trail.

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

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 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.

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_trailARN :: Lens' GetInsightSelectorsResponse (Maybe Text) Source #

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

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, only ApiCallRateInsight is supported as an insight type.

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_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_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_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_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_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. A value of false logs both read and 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::S3::AccessPoint, AWS::Lambda::Function, AWS::DynamoDB::Table, AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, AWS::S3ObjectLambda::AccessPoint, or AWS::EC2::Snapshot. 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>

DataResource

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.

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

The resource type in which you want to log data events. You can specify AWS::S3::Object, AWS::Lambda::Function, or AWS::DynamoDB::Table resources.

The AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, AWS::S3ObjectLambda::AccessPoint, and AWS::EC2::Snapshot resource types are not valid in basic event selectors. To log data events on these resource types, use advanced event selectors.

Event

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

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

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

A list of resources referenced by the event returned.

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

The date and time of the event returned.

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

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

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

The name 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_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_eventSource :: Lens' Event (Maybe Text) Source #

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

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

The CloudTrail ID of the event returned.

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_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.

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.

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.

InsightSelector

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

The type of Insights events to log on a trail. The valid Insights type in this release is ApiCallRateInsight.

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_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.

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

The starting time of validity of the public key.

Resource

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.

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.

ResourceTag

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

Specifies the ARN of the resource.

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_logFileValidationEnabled :: Lens' Trail (Maybe Bool) Source #

Specifies whether log file validation is enabled.

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

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_hasInsightSelectors :: Lens' Trail (Maybe Bool) Source #

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

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_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_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_homeRegion :: Lens' Trail (Maybe Text) Source #

The region in which the trail was created.

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

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

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_hasCustomEventSelectors :: Lens' Trail (Maybe Bool) Source #

Specifies if the trail has custom event selectors.

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

Specifies whether the trail is an organization trail.

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_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_isMultiRegionTrail :: Lens' Trail (Maybe Bool) Source #

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

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.