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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofLogDriverConfig.getLogDriver()
Sets the value ofLogDriverConfig.getOptions()
secretOptions
(List<? extends CfnTaskDefinition.SecretProperty> secretOptions) Sets the value ofLogDriverConfig.getSecretOptions()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logDriver
Sets the value ofLogDriverConfig.getLogDriver()
- 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
Sets the value ofLogDriverConfig.getOptions()
- 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) Sets the value ofLogDriverConfig.getSecretOptions()
- Parameters:
secretOptions
- The secrets to pass to the log configuration.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LogDriverConfig>
- Returns:
- a new instance of
LogDriverConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-