Enum AwsLogDriverMode

All Implemented Interfaces:
Serializable, Comparable<AwsLogDriverMode>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-02-23T02:06:31.701Z") @Stability(Stable) public enum AwsLogDriverMode extends Enum<AwsLogDriverMode>
awslogs provides two modes for delivering messages from the container to the log driver.


 Cluster cluster;
 // Create a Task Definition for the container to start
 Ec2TaskDefinition taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
 taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromAsset(resolve(__dirname, "..", "eventhandler-image")))
 // An Rule that describes the event trigger (in this case a scheduled run)
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.expression("rate(1 min)"))
 // Pass an environment variable to the container 'TheContainer' in the task
                         .value("From CloudWatch Events")
  • Enum Constant Details


      @Stability(Stable) public static final AwsLogDriverMode BLOCKING
      (default) direct, blocking delivery from container to driver.

      @Stability(Stable) public static final AwsLogDriverMode NON_BLOCKING
      The non-blocking message delivery mode prevents applications from blocking due to logging back pressure.

      Applications are likely to fail in unexpected ways when STDERR or STDOUT streams block.

  • Method Details

    • values

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

      public static AwsLogDriverMode 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null