Enum ExecuteCommandLogging
The log settings to use to for logging the execute command session.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum ExecuteCommandLogging
Syntax (vb)
Public Enum ExecuteCommandLogging
Remarks
For more information, see [Logging] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logging
ExampleMetadata: infused
Examples
Vpc vpc;
var kmsKey = new Key(this, "KmsKey");
// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
var logGroup = new LogGroup(this, "LogGroup", new LogGroupProps {
EncryptionKey = kmsKey
});
// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
var execBucket = new Bucket(this, "EcsExecBucket", new BucketProps {
EncryptionKey = kmsKey
});
var cluster = new Cluster(this, "Cluster", new ClusterProps {
Vpc = vpc,
ExecuteCommandConfiguration = new ExecuteCommandConfiguration {
KmsKey = kmsKey,
LogConfiguration = new ExecuteCommandLogConfiguration {
CloudWatchLogGroup = logGroup,
CloudWatchEncryptionEnabled = true,
S3Bucket = execBucket,
S3EncryptionEnabled = true,
S3KeyPrefix = "exec-command-output"
},
Logging = ExecuteCommandLogging.OVERRIDE
}
});
Synopsis
Fields
| DEFAULT | The awslogs configuration in the task definition is used. |
| NONE | The execute command session is not logged. |
| OVERRIDE | Specify the logging details as a part of logConfiguration. |
Fields
| Name | Description |
|---|---|
| DEFAULT | The awslogs configuration in the task definition is used. |
| NONE | The execute command session is not logged. |
| OVERRIDE | Specify the logging details as a part of logConfiguration. |