Class LogDriverConfig.Builder

java.lang.Object
software.amazon.awscdk.services.ecs.LogDriverConfig.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<LogDriverConfig>
Enclosing interface:
LogDriverConfig

@Stability(Stable) public static final class LogDriverConfig.Builder extends Object implements software.amazon.jsii.Builder<LogDriverConfig>
A builder for LogDriverConfig
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • logDriver

      @Stability(Stable) public LogDriverConfig.Builder logDriver(String logDriver)
      Parameters:
      logDriver - The log driver to use for the container. This parameter is required. 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.

      Returns:
      this
    • options

      @Stability(Stable) public LogDriverConfig.Builder options(Map<String,String> options)
      Parameters:
      options - The configuration options to send to the log driver.
      Returns:
      this
    • secretOptions

      @Stability(Stable) public LogDriverConfig.Builder secretOptions(List<? extends CfnTaskDefinition.SecretProperty> secretOptions)
      Parameters:
      secretOptions - The secrets to pass to the log configuration.
      Returns:
      this
    • build

      @Stability(Stable) public LogDriverConfig build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<LogDriverConfig>
      Returns:
      a new instance of LogDriverConfig
      Throws:
      NullPointerException - if any required attribute was not provided