Enum ExecuteCommandLogging

java.lang.Object
java.lang.Enum<ExecuteCommandLogging>
software.amazon.awscdk.services.ecs.ExecuteCommandLogging
All Implemented Interfaces:
Serializable, Comparable<ExecuteCommandLogging>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.314Z") @Stability(Stable) public enum ExecuteCommandLogging extends Enum<ExecuteCommandLogging>
The log settings to use to for logging the execute command session.

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 Details

    • NONE

      @Stability(Stable) public static final ExecuteCommandLogging NONE
      The execute command session is not logged.
    • DEFAULT

      @Stability(Stable) public static final ExecuteCommandLogging DEFAULT
      The awslogs configuration in the task definition is used.

      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.

    • OVERRIDE

      @Stability(Stable) public static final ExecuteCommandLogging OVERRIDE
      Specify the logging details as a part of logConfiguration.
  • Method Details

    • values

      public static ExecuteCommandLogging[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ExecuteCommandLogging valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null