@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:07.407Z") @Stability(value=Experimental) public enum ExecuteCommandLogging extends Enum<ExecuteCommandLogging>
For more information, see [Logging] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logging
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();
| Enum Constant and Description |
|---|
DEFAULT
(experimental) The awslogs configuration in the task definition is used.
|
NONE
(experimental) The execute command session is not logged.
|
OVERRIDE
(experimental) Specify the logging details as a part of logConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
static ExecuteCommandLogging |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExecuteCommandLogging[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final ExecuteCommandLogging NONE
@Stability(value=Experimental) public static final ExecuteCommandLogging DEFAULT
If no logging parameter is specified, it defaults to this value. If no awslogs log driver is configured in the task definition, the output won't be logged.
@Stability(value=Experimental) public static final ExecuteCommandLogging OVERRIDE
public static ExecuteCommandLogging[] values()
for (ExecuteCommandLogging c : ExecuteCommandLogging.values()) System.out.println(c);
public static ExecuteCommandLogging valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.