interface LogDriverConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.LogDriverConfig |
Java | software.amazon.awscdk.services.ecs.LogDriverConfig |
Python | aws_cdk.aws_ecs.LogDriverConfig |
TypeScript (source) | @aws-cdk/aws-ecs » LogDriverConfig |
Obtainable from
Aws
.bind()
, Fire
.bind()
, Fluentd
.bind()
, Gelf
.bind()
, Generic
.bind()
, Journald
.bind()
, Json
.bind()
, Log
.bind()
, Splunk
.bind()
, Syslog
.bind()
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 * as ecs from '@aws-cdk/aws-ecs';
const logDriverConfig: ecs.LogDriverConfig = {
logDriver: 'logDriver',
// the properties below are optional
options: {
optionsKey: 'options',
},
secretOptions: [{
name: 'name',
valueFrom: 'valueFrom',
}],
};
Properties
Name | Type | Description |
---|---|---|
log | string | The log driver to use for the container. |
options? | { [string]: string } | The configuration options to send to the log driver. |
secret | Secret [] | The secrets to pass to the log configuration. |
logDriver
Type:
string
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.
options?
Type:
{ [string]: string }
(optional)
The configuration options to send to the log driver.
secretOptions?
Type:
Secret
[]
(optional, default: No secret options provided.)
The secrets to pass to the log configuration.