Interface ExecuteCommandLogConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ExecuteCommandLogConfiguration.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.313Z")
@Stability(Stable)
public interface ExecuteCommandLogConfiguration
extends software.amazon.jsii.JsiiSerializable
The log configuration for the results of the execute command actions.
The logs can be sent to CloudWatch Logs and/ or an Amazon S3 bucket. For more information, see [ExecuteCommandLogConfiguration] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html
Example:
Vpc vpc;
Key kmsKey = new Key(this, "KmsKey");
// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
LogGroup logGroup = LogGroup.Builder.create(this, "LogGroup")
.encryptionKey(kmsKey)
.build();
// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
Bucket execBucket = Bucket.Builder.create(this, "EcsExecBucket")
.encryptionKey(kmsKey)
.build();
Cluster cluster = Cluster.Builder.create(this, "Cluster")
.vpc(vpc)
.executeCommandConfiguration(ExecuteCommandConfiguration.builder()
.kmsKey(kmsKey)
.logConfiguration(ExecuteCommandLogConfiguration.builder()
.cloudWatchLogGroup(logGroup)
.cloudWatchEncryptionEnabled(true)
.s3Bucket(execBucket)
.s3EncryptionEnabled(true)
.s3KeyPrefix("exec-command-output")
.build())
.logging(ExecuteCommandLogging.OVERRIDE)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forExecuteCommandLogConfigurationstatic final classAn implementation forExecuteCommandLogConfiguration -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanWhether or not to enable encryption on the CloudWatch logs.default ILogGroupThe name of the CloudWatch log group to send logs to.default IBucketThe name of the S3 bucket to send logs to.default BooleanWhether or not to enable encryption on the CloudWatch logs.default StringAn optional folder in the S3 bucket to place logs in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCloudWatchEncryptionEnabled
Whether or not to enable encryption on the CloudWatch logs.Default: - encryption will be disabled.
-
getCloudWatchLogGroup
The name of the CloudWatch log group to send logs to.The CloudWatch log group must already be created.
Default: - none
-
getS3Bucket
The name of the S3 bucket to send logs to.The S3 bucket must already be created.
Default: - none
-
getS3EncryptionEnabled
Whether or not to enable encryption on the CloudWatch logs.Default: - encryption will be disabled.
-
getS3KeyPrefix
An optional folder in the S3 bucket to place logs in.Default: - none
-
builder
-