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 |
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
Synopsis
- data CreateTrail = CreateTrail' {
- s3KeyPrefix :: Maybe Text
- snsTopicName :: Maybe Text
- enableLogFileValidation :: Maybe Bool
- cloudWatchLogsLogGroupArn :: Maybe Text
- kmsKeyId :: Maybe Text
- includeGlobalServiceEvents :: Maybe Bool
- tagsList :: Maybe [Tag]
- isOrganizationTrail :: Maybe Bool
- cloudWatchLogsRoleArn :: Maybe Text
- isMultiRegionTrail :: Maybe Bool
- name :: Text
- s3BucketName :: Text
- newCreateTrail :: Text -> Text -> CreateTrail
- createTrail_s3KeyPrefix :: Lens' CreateTrail (Maybe Text)
- createTrail_snsTopicName :: Lens' CreateTrail (Maybe Text)
- createTrail_enableLogFileValidation :: Lens' CreateTrail (Maybe Bool)
- createTrail_cloudWatchLogsLogGroupArn :: Lens' CreateTrail (Maybe Text)
- createTrail_kmsKeyId :: Lens' CreateTrail (Maybe Text)
- createTrail_includeGlobalServiceEvents :: Lens' CreateTrail (Maybe Bool)
- createTrail_tagsList :: Lens' CreateTrail (Maybe [Tag])
- createTrail_isOrganizationTrail :: Lens' CreateTrail (Maybe Bool)
- createTrail_cloudWatchLogsRoleArn :: Lens' CreateTrail (Maybe Text)
- createTrail_isMultiRegionTrail :: Lens' CreateTrail (Maybe Bool)
- createTrail_name :: Lens' CreateTrail Text
- createTrail_s3BucketName :: Lens' CreateTrail Text
- data CreateTrailResponse = CreateTrailResponse' {
- 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
- newCreateTrailResponse :: Int -> CreateTrailResponse
- createTrailResponse_logFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool)
- createTrailResponse_trailARN :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_s3KeyPrefix :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_snsTopicARN :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_snsTopicName :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_cloudWatchLogsLogGroupArn :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_kmsKeyId :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_name :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_includeGlobalServiceEvents :: Lens' CreateTrailResponse (Maybe Bool)
- createTrailResponse_isOrganizationTrail :: Lens' CreateTrailResponse (Maybe Bool)
- createTrailResponse_cloudWatchLogsRoleArn :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_s3BucketName :: Lens' CreateTrailResponse (Maybe Text)
- createTrailResponse_isMultiRegionTrail :: Lens' CreateTrailResponse (Maybe Bool)
- createTrailResponse_httpStatus :: Lens' CreateTrailResponse Int
Creating a Request
data CreateTrail Source #
Specifies the settings for each trail.
See: newCreateTrail
smart constructor.
CreateTrail' | |
|
Instances
Create a value of CreateTrail
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:CreateTrail'
, createTrail_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:CreateTrail'
, createTrail_snsTopicName
- Specifies the name of the Amazon SNS topic defined for notification of
log file delivery. The maximum length is 256 characters.
$sel:enableLogFileValidation:CreateTrail'
, createTrail_enableLogFileValidation
- 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.
$sel:cloudWatchLogsLogGroupArn:CreateTrail'
, createTrail_cloudWatchLogsLogGroupArn
- 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
.
$sel:kmsKeyId:CreateTrail'
, createTrail_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:CreateTrail'
, createTrail_includeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services
such as IAM to the log files.
$sel:tagsList:CreateTrail'
, createTrail_tagsList
- Undocumented member.
$sel:isOrganizationTrail:CreateTrail'
, createTrail_isOrganizationTrail
- 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.
$sel:cloudWatchLogsRoleArn:CreateTrail'
, createTrail_cloudWatchLogsRoleArn
- Specifies the role for the CloudWatch Logs endpoint to assume to write
to a user's log group.
$sel:isMultiRegionTrail:CreateTrail'
, createTrail_isMultiRegionTrail
- 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.
$sel:name:CreateTrail'
, createTrail_name
- 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
andmy--namespace
are not valid. - Not be in IP address format (for example, 192.168.5.4)
$sel:s3BucketName:CreateTrail'
, createTrail_s3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log
files. See
Amazon S3 Bucket Naming Requirements.
Request Lenses
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_tagsList :: Lens' CreateTrail (Maybe [Tag]) Source #
Undocumented member.
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
andmy--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.
Destructuring the Response
data CreateTrailResponse Source #
Returns the objects or data listed below if successful. Otherwise, returns an error.
See: newCreateTrailResponse
smart constructor.
CreateTrailResponse' | |
|
Instances
newCreateTrailResponse Source #
Create a value of CreateTrailResponse
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:CreateTrailResponse'
, createTrailResponse_logFileValidationEnabled
- Specifies whether log file integrity validation is enabled.
$sel:trailARN:CreateTrailResponse'
, createTrailResponse_trailARN
- 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
$sel:s3KeyPrefix:CreateTrail'
, createTrailResponse_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.
$sel:snsTopicARN:CreateTrailResponse'
, createTrailResponse_snsTopicARN
- 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
$sel:snsTopicName:CreateTrail'
, createTrailResponse_snsTopicName
- This field is no longer in use. Use SnsTopicARN.
$sel:cloudWatchLogsLogGroupArn:CreateTrail'
, createTrailResponse_cloudWatchLogsLogGroupArn
- Specifies the Amazon Resource Name (ARN) of the log group to which
CloudTrail logs will be delivered.
$sel:kmsKeyId:CreateTrail'
, createTrailResponse_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:CreateTrail'
, createTrailResponse_name
- Specifies the name of the trail.
$sel:includeGlobalServiceEvents:CreateTrail'
, createTrailResponse_includeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services
such as IAM to the log files.
$sel:isOrganizationTrail:CreateTrail'
, createTrailResponse_isOrganizationTrail
- Specifies whether the trail is an organization trail.
$sel:cloudWatchLogsRoleArn:CreateTrail'
, createTrailResponse_cloudWatchLogsRoleArn
- Specifies the role for the CloudWatch Logs endpoint to assume to write
to a user's log group.
$sel:s3BucketName:CreateTrail'
, createTrailResponse_s3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log
files.
$sel:isMultiRegionTrail:CreateTrail'
, createTrailResponse_isMultiRegionTrail
- Specifies whether the trail exists in one region or in all regions.
$sel:httpStatus:CreateTrailResponse'
, createTrailResponse_httpStatus
- The response's http status code.
Response Lenses
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.
createTrailResponse_httpStatus :: Lens' CreateTrailResponse Int Source #
The response's http status code.