Interface LogDriverConfig

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:01.146Z") @Stability(Stable) public interface LogDriverConfig extends software.amazon.jsii.JsiiSerializable
The configuration to use when creating a log driver.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecs.*;
 LogDriverConfig logDriverConfig = LogDriverConfig.builder()
         .logDriver("logDriver")
         // the properties below are optional
         .options(Map.of(
                 "optionsKey", "options"))
         .secretOptions(List.of(SecretProperty.builder()
                 .name("name")
                 .valueFrom("valueFrom")
                 .build()))
         .build();
 
  • Method Details

    • getLogDriver

      @Stability(Stable) @NotNull String getLogDriver()
      The log driver to use for the container.

      The valid values listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default.

      For tasks using the Fargate launch type, the supported log drivers are awslogs, splunk, and awsfirelens. For tasks using the EC2 launch type, the supported log drivers are awslogs, fluentd, gelf, json-file, journald, logentries,syslog, splunk, and awsfirelens.

      For more information about using the awslogs log driver, see Using the awslogs Log Driver in the Amazon Elastic Container Service Developer Guide.

      For more information about using the awsfirelens log driver, see Custom Log Routing in the Amazon Elastic Container Service Developer Guide.

    • getOptions

      @Stability(Stable) @Nullable default Map<String,String> getOptions()
      The configuration options to send to the log driver.
    • getSecretOptions

      @Stability(Stable) @Nullable default List<CfnTaskDefinition.SecretProperty> getSecretOptions()
      The secrets to pass to the log configuration.

      Default: - No secret options provided.

    • builder

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