UNPKG

2.67 kBTypeScriptView Raw
1import { ContainerDefinition, Secret } from '../container-definition';
2import { LogDriver, LogDriverConfig } from './log-driver';
3import { Construct as CoreConstruct } from '@aws-cdk/core';
4/**
5 * The configuration to use when creating a log driver.
6 */
7export interface GenericLogDriverProps {
8 /**
9 * The log driver to use for the container. The valid values listed for this parameter are log drivers
10 * that the Amazon ECS container agent can communicate with by default.
11 *
12 * For tasks using the Fargate launch type, the supported log drivers are awslogs and splunk.
13 * For tasks using the EC2 launch type, the supported log drivers are awslogs, syslog, gelf, fluentd, splunk, journald, and json-file.
14 *
15 * For more information about using the awslogs log driver, see
16 * [Using the awslogs Log Driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html)
17 * in the Amazon Elastic Container Service Developer Guide.
18 */
19 readonly logDriver: string;
20 /**
21 * The configuration options to send to the log driver.
22 * @default - the log driver options.
23 */
24 readonly options?: {
25 [key: string]: string;
26 };
27 /**
28 * The secrets to pass to the log configuration.
29 * @default - no secret options provided.
30 */
31 readonly secretOptions?: {
32 [key: string]: Secret;
33 };
34}
35/**
36 * A log driver that sends logs to the specified driver.
37 */
38export declare class GenericLogDriver extends LogDriver {
39 /**
40 * The log driver to use for the container. The valid values listed for this parameter are log drivers
41 * that the Amazon ECS container agent can communicate with by default. You cannot use awslogs with the GenericLogDriver.
42 * You must use the AwsLogDriver if you want to use awslogs.
43 *
44 * For tasks using the Fargate launch type, the supported log drivers are awslogs and splunk.
45 * For tasks using the EC2 launch type, the supported log drivers are awslogs, syslog, gelf, fluentd, splunk, journald, and json-file.
46 *
47 */
48 private logDriver;
49 /**
50 * The configuration options to send to the log driver.
51 */
52 private options;
53 /**
54 * The secrets to pass to the log configuration.
55 */
56 private secretOptions?;
57 /**
58 * Constructs a new instance of the GenericLogDriver class.
59 *
60 * @param props the generic log driver configuration options.
61 */
62 constructor(props: GenericLogDriverProps);
63 /**
64 * Called when the log driver is configured on a container.
65 */
66 bind(_scope: CoreConstruct, _containerDefinition: ContainerDefinition): LogDriverConfig;
67}