Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Updates trail settings that control what events you are logging, and how
to handle log files. Changes to a trail do not require stopping the
CloudTrail service. Use this action to designate an existing bucket for
log delivery. If the existing bucket has previously been a target for
CloudTrail log files, an IAM policy exists for the bucket. UpdateTrail
must be called from the region in which the trail was created;
otherwise, an InvalidHomeRegionException
is thrown.
Synopsis
- data UpdateTrail = UpdateTrail' {
- s3KeyPrefix :: Maybe Text
- snsTopicName :: Maybe Text
- enableLogFileValidation :: Maybe Bool
- cloudWatchLogsLogGroupArn :: Maybe Text
- kmsKeyId :: Maybe Text
- includeGlobalServiceEvents :: Maybe Bool
- isOrganizationTrail :: Maybe Bool
- cloudWatchLogsRoleArn :: Maybe Text
- s3BucketName :: Maybe Text
- isMultiRegionTrail :: Maybe Bool
- name :: Text
- newUpdateTrail :: Text -> UpdateTrail
- updateTrail_s3KeyPrefix :: Lens' UpdateTrail (Maybe Text)
- updateTrail_snsTopicName :: Lens' UpdateTrail (Maybe Text)
- updateTrail_enableLogFileValidation :: Lens' UpdateTrail (Maybe Bool)
- updateTrail_cloudWatchLogsLogGroupArn :: Lens' UpdateTrail (Maybe Text)
- updateTrail_kmsKeyId :: Lens' UpdateTrail (Maybe Text)
- updateTrail_includeGlobalServiceEvents :: Lens' UpdateTrail (Maybe Bool)
- updateTrail_isOrganizationTrail :: Lens' UpdateTrail (Maybe Bool)
- updateTrail_cloudWatchLogsRoleArn :: Lens' UpdateTrail (Maybe Text)
- updateTrail_s3BucketName :: Lens' UpdateTrail (Maybe Text)
- updateTrail_isMultiRegionTrail :: Lens' UpdateTrail (Maybe Bool)
- updateTrail_name :: Lens' UpdateTrail Text
- data UpdateTrailResponse = UpdateTrailResponse' {
- logFileValidationEnabled :: Maybe Bool
- trailARN :: Maybe Text
- s3KeyPrefix :: Maybe Text
- snsTopicARN :: Maybe Text
- snsTopicName :: Maybe Text
- cloudWatchLogsLogGroupArn :: Maybe Text
- kmsKeyId :: Maybe Text
- name :: Maybe Text
- includeGlobalServiceEvents :: Maybe Bool
- isOrganizationTrail :: Maybe Bool
- cloudWatchLogsRoleArn :: Maybe Text
- s3BucketName :: Maybe Text
- isMultiRegionTrail :: Maybe Bool
- httpStatus :: Int
- newUpdateTrailResponse :: Int -> UpdateTrailResponse
- updateTrailResponse_logFileValidationEnabled :: Lens' UpdateTrailResponse (Maybe Bool)
- updateTrailResponse_trailARN :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_s3KeyPrefix :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_snsTopicARN :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_snsTopicName :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_cloudWatchLogsLogGroupArn :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_kmsKeyId :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_name :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_includeGlobalServiceEvents :: Lens' UpdateTrailResponse (Maybe Bool)
- updateTrailResponse_isOrganizationTrail :: Lens' UpdateTrailResponse (Maybe Bool)
- updateTrailResponse_cloudWatchLogsRoleArn :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_s3BucketName :: Lens' UpdateTrailResponse (Maybe Text)
- updateTrailResponse_isMultiRegionTrail :: Lens' UpdateTrailResponse (Maybe Bool)
- updateTrailResponse_httpStatus :: Lens' UpdateTrailResponse Int
Creating a Request
data UpdateTrail Source #
Specifies settings to update for the trail.
See: newUpdateTrail
smart constructor.
UpdateTrail' | |
|
Instances
Create a value of UpdateTrail
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:s3KeyPrefix:UpdateTrail'
, updateTrail_s3KeyPrefix
- 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.
$sel:snsTopicName:UpdateTrail'
, updateTrail_snsTopicName
- Specifies the name of the Amazon SNS topic defined for notification of
log file delivery. The maximum length is 256 characters.
$sel:enableLogFileValidation:UpdateTrail'
, updateTrail_enableLogFileValidation
- 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.
$sel:cloudWatchLogsLogGroupArn:UpdateTrail'
, updateTrail_cloudWatchLogsLogGroupArn
- 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
.
$sel:kmsKeyId:UpdateTrail'
, updateTrail_kmsKeyId
- 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
$sel:includeGlobalServiceEvents:UpdateTrail'
, updateTrail_includeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services
such as IAM to the log files.
$sel:isOrganizationTrail:UpdateTrail'
, updateTrail_isOrganizationTrail
- 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.
$sel:cloudWatchLogsRoleArn:UpdateTrail'
, updateTrail_cloudWatchLogsRoleArn
- Specifies the role for the CloudWatch Logs endpoint to assume to write
to a user's log group.
$sel:s3BucketName:UpdateTrail'
, updateTrail_s3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log
files. See
Amazon S3 Bucket Naming Requirements.
$sel:isMultiRegionTrail:UpdateTrail'
, updateTrail_isMultiRegionTrail
- 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.
$sel:name:UpdateTrail'
, updateTrail_name
- 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
andmy--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
Request Lenses
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
andmy--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
Destructuring the Response
data UpdateTrailResponse Source #
Returns the objects or data listed below if successful. Otherwise, returns an error.
See: newUpdateTrailResponse
smart constructor.
UpdateTrailResponse' | |
|
Instances
newUpdateTrailResponse Source #
Create a value of UpdateTrailResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:logFileValidationEnabled:UpdateTrailResponse'
, updateTrailResponse_logFileValidationEnabled
- Specifies whether log file integrity validation is enabled.
$sel:trailARN:UpdateTrailResponse'
, updateTrailResponse_trailARN
- 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
$sel:s3KeyPrefix:UpdateTrail'
, updateTrailResponse_s3KeyPrefix
- 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.
$sel:snsTopicARN:UpdateTrailResponse'
, updateTrailResponse_snsTopicARN
- 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
$sel:snsTopicName:UpdateTrail'
, updateTrailResponse_snsTopicName
- This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
$sel:cloudWatchLogsLogGroupArn:UpdateTrail'
, updateTrailResponse_cloudWatchLogsLogGroupArn
- Specifies the Amazon Resource Name (ARN) of the log group to which
CloudTrail logs are delivered.
$sel:kmsKeyId:UpdateTrail'
, updateTrailResponse_kmsKeyId
- 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
$sel:name:UpdateTrail'
, updateTrailResponse_name
- Specifies the name of the trail.
$sel:includeGlobalServiceEvents:UpdateTrail'
, updateTrailResponse_includeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services
such as IAM to the log files.
$sel:isOrganizationTrail:UpdateTrail'
, updateTrailResponse_isOrganizationTrail
- Specifies whether the trail is an organization trail.
$sel:cloudWatchLogsRoleArn:UpdateTrail'
, updateTrailResponse_cloudWatchLogsRoleArn
- Specifies the role for the CloudWatch Logs endpoint to assume to write
to a user's log group.
$sel:s3BucketName:UpdateTrail'
, updateTrailResponse_s3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log
files.
$sel:isMultiRegionTrail:UpdateTrail'
, updateTrailResponse_isMultiRegionTrail
- Specifies whether the trail exists in one region or in all regions.
$sel:httpStatus:UpdateTrailResponse'
, updateTrailResponse_httpStatus
- The response's http status code.
Response Lenses
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.
updateTrailResponse_httpStatus :: Lens' UpdateTrailResponse Int Source #
The response's http status code.