Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
- createTrail :: Text -> Text -> CreateTrail
- data CreateTrail
- ctS3KeyPrefix :: Lens' CreateTrail (Maybe Text)
- ctSNSTopicName :: Lens' CreateTrail (Maybe Text)
- ctEnableLogFileValidation :: Lens' CreateTrail (Maybe Bool)
- ctCloudWatchLogsLogGroupARN :: Lens' CreateTrail (Maybe Text)
- ctKMSKeyId :: Lens' CreateTrail (Maybe Text)
- ctIncludeGlobalServiceEvents :: Lens' CreateTrail (Maybe Bool)
- ctCloudWatchLogsRoleARN :: Lens' CreateTrail (Maybe Text)
- ctIsMultiRegionTrail :: Lens' CreateTrail (Maybe Bool)
- ctName :: Lens' CreateTrail Text
- ctS3BucketName :: Lens' CreateTrail Text
- createTrailResponse :: Int -> CreateTrailResponse
- data CreateTrailResponse
- ctrsLogFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool)
- ctrsTrailARN :: Lens' CreateTrailResponse (Maybe Text)
- ctrsS3KeyPrefix :: Lens' CreateTrailResponse (Maybe Text)
- ctrsSNSTopicARN :: Lens' CreateTrailResponse (Maybe Text)
- ctrsSNSTopicName :: Lens' CreateTrailResponse (Maybe Text)
- ctrsCloudWatchLogsLogGroupARN :: Lens' CreateTrailResponse (Maybe Text)
- ctrsKMSKeyId :: Lens' CreateTrailResponse (Maybe Text)
- ctrsName :: Lens' CreateTrailResponse (Maybe Text)
- ctrsIncludeGlobalServiceEvents :: Lens' CreateTrailResponse (Maybe Bool)
- ctrsCloudWatchLogsRoleARN :: Lens' CreateTrailResponse (Maybe Text)
- ctrsS3BucketName :: Lens' CreateTrailResponse (Maybe Text)
- ctrsIsMultiRegionTrail :: Lens' CreateTrailResponse (Maybe Bool)
- ctrsResponseStatus :: Lens' CreateTrailResponse Int
Creating a Request
Creates a value of CreateTrail
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ctS3KeyPrefix
- 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.ctSNSTopicName
- Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.ctEnableLogFileValidation
- Specifies whether log file integrity validation is enabled. The default is false.ctCloudWatchLogsLogGroupARN
- 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.ctKMSKeyId
- 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. Examples: * aliasMyAliasName * arn:aws:kms:us-east-1:123456789012:aliasMyAliasName * arn:aws:kms:us-east-1:123456789012:key12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012ctIncludeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services such as IAM to the log files.ctCloudWatchLogsRoleARN
- Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.ctIsMultiRegionTrail
- Specifies whether the trail is created in the current region or in all regions. The default is false.ctName
- 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 likemy-_namespace
andmy--namespace
are invalid. * Not be in IP address format (for example, 192.168.5.4)ctS3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements .
data CreateTrail Source #
Specifies the settings for each trail.
See: createTrail
smart constructor.
Request Lenses
ctS3KeyPrefix :: 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.
ctSNSTopicName :: 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.
ctEnableLogFileValidation :: Lens' CreateTrail (Maybe Bool) Source #
Specifies whether log file integrity validation is enabled. The default is false.
ctCloudWatchLogsLogGroupARN :: 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.
ctKMSKeyId :: 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. Examples: * aliasMyAliasName * arn:aws:kms:us-east-1:123456789012:aliasMyAliasName * arn:aws:kms:us-east-1:123456789012:key12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012
ctIncludeGlobalServiceEvents :: Lens' CreateTrail (Maybe Bool) Source #
Specifies whether the trail is publishing events from global services such as IAM to the log files.
ctCloudWatchLogsRoleARN :: Lens' CreateTrail (Maybe Text) Source #
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
ctIsMultiRegionTrail :: Lens' CreateTrail (Maybe Bool) Source #
Specifies whether the trail is created in the current region or in all regions. The default is false.
ctName :: 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 invalid. * Not be in IP address format (for example, 192.168.5.4)
ctS3BucketName :: 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
Creates a value of CreateTrailResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ctrsLogFileValidationEnabled
- Specifies whether log file integrity validation is enabled.ctrsTrailARN
- Specifies the ARN of the trail that was created. The format of a trail ARN is:arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
ctrsS3KeyPrefix
- 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 .ctrsSNSTopicARN
- 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-1:123456789012:MyTopic
ctrsSNSTopicName
- This field is deprecated. Use SnsTopicARN.ctrsCloudWatchLogsLogGroupARN
- Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.ctrsKMSKeyId
- 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 format:arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
ctrsName
- Specifies the name of the trail.ctrsIncludeGlobalServiceEvents
- Specifies whether the trail is publishing events from global services such as IAM to the log files.ctrsCloudWatchLogsRoleARN
- Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.ctrsS3BucketName
- Specifies the name of the Amazon S3 bucket designated for publishing log files.ctrsIsMultiRegionTrail
- Specifies whether the trail exists in one region or in all regions.ctrsResponseStatus
- -- | The response status code.
data CreateTrailResponse Source #
Returns the objects or data listed below if successful. Otherwise, returns an error.
See: createTrailResponse
smart constructor.
Response Lenses
ctrsLogFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool) Source #
Specifies whether log file integrity validation is enabled.
ctrsTrailARN :: 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-1:123456789012:trail/MyTrail
ctrsS3KeyPrefix :: 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 .
ctrsSNSTopicARN :: 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-1:123456789012:MyTopic
ctrsSNSTopicName :: Lens' CreateTrailResponse (Maybe Text) Source #
This field is deprecated. Use SnsTopicARN.
ctrsCloudWatchLogsLogGroupARN :: Lens' CreateTrailResponse (Maybe Text) Source #
Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.
ctrsKMSKeyId :: 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 format: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
ctrsIncludeGlobalServiceEvents :: Lens' CreateTrailResponse (Maybe Bool) Source #
Specifies whether the trail is publishing events from global services such as IAM to the log files.
ctrsCloudWatchLogsRoleARN :: Lens' CreateTrailResponse (Maybe Text) Source #
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
ctrsS3BucketName :: Lens' CreateTrailResponse (Maybe Text) Source #
Specifies the name of the Amazon S3 bucket designated for publishing log files.
ctrsIsMultiRegionTrail :: Lens' CreateTrailResponse (Maybe Bool) Source #
Specifies whether the trail exists in one region or in all regions.
ctrsResponseStatus :: Lens' CreateTrailResponse Int Source #
- - | The response status code.