Interface ExecuteCommandConfiguration

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ExecuteCommandConfiguration.Jsii$Proxy

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-09-10T01:10:08.828Z") @Stability(Stable) public interface ExecuteCommandConfiguration extends software.amazon.jsii.JsiiSerializable
The details of the execute command configuration.

For more information, see [ExecuteCommandConfiguration] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.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();
 
  • Method Details

    • getKmsKey

      @Stability(Stable) @Nullable default IKey getKmsKey()
      The AWS Key Management Service key ID to encrypt the data between the local client and the container.

      Default: - none

    • getLogConfiguration

      @Stability(Stable) @Nullable default ExecuteCommandLogConfiguration getLogConfiguration()
      The log configuration for the results of the execute command actions.

      The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.

      Default: - none

    • getLogging

      @Stability(Stable) @Nullable default ExecuteCommandLogging getLogging()
      The log settings to use for logging the execute command session.

      Default: - none

    • builder

      @Stability(Stable) static ExecuteCommandConfiguration.Builder builder()
      Returns:
      a ExecuteCommandConfiguration.Builder of ExecuteCommandConfiguration