@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.672Z") public enum ExecuteCommandLogging extends java.lang.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
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.
|
Modifier and Type | Method and Description |
---|---|
static ExecuteCommandLogging |
valueOf(java.lang.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.
|
public static final ExecuteCommandLogging NONE
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.
public static final ExecuteCommandLogging OVERRIDE
public static ExecuteCommandLogging[] values()
for (ExecuteCommandLogging c : ExecuteCommandLogging.values()) System.out.println(c);
public static ExecuteCommandLogging valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null