/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The FireLens configuration for the container. This is used to specify and configure a log router for container logs. * For more information, see Custom log routing in the * Amazon Elastic Container Service Developer Guide. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FirelensConfiguration implements Serializable, Cloneable, StructuredPojo { /** *
* The log router to use. The valid values are fluentd
or fluentbit
.
*
* The options to use when configuring the log router. This field is optional and can be used to specify a custom
* configuration file or to add additional metadata, such as the task, task definition, cluster, and container
* instance details to the log event. If specified, the syntax to use is
* "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating
* a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer
* Guide.
*
* Tasks hosted on Fargate only support the file
configuration file type.
*
* The log router to use. The valid values are fluentd
or fluentbit
.
*
fluentd
or fluentbit
.
* @see FirelensConfigurationType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The log router to use. The valid values are fluentd
or fluentbit
.
*
fluentd
or fluentbit
.
* @see FirelensConfigurationType
*/
public String getType() {
return this.type;
}
/**
*
* The log router to use. The valid values are fluentd
or fluentbit
.
*
fluentd
or fluentbit
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FirelensConfigurationType
*/
public FirelensConfiguration withType(String type) {
setType(type);
return this;
}
/**
*
* The log router to use. The valid values are fluentd
or fluentbit
.
*
fluentd
or fluentbit
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FirelensConfigurationType
*/
public FirelensConfiguration withType(FirelensConfigurationType type) {
this.type = type.toString();
return this;
}
/**
*
* The options to use when configuring the log router. This field is optional and can be used to specify a custom
* configuration file or to add additional metadata, such as the task, task definition, cluster, and container
* instance details to the log event. If specified, the syntax to use is
* "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating
* a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer
* Guide.
*
* Tasks hosted on Fargate only support the file
configuration file type.
*
"options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating a task definition that uses a FireLens configuration in the Amazon Elastic Container
* Service Developer Guide.
* Tasks hosted on Fargate only support the file
configuration file type.
*
* The options to use when configuring the log router. This field is optional and can be used to specify a custom
* configuration file or to add additional metadata, such as the task, task definition, cluster, and container
* instance details to the log event. If specified, the syntax to use is
* "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating
* a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer
* Guide.
*
* Tasks hosted on Fargate only support the file
configuration file type.
*
"options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating a task definition that uses a FireLens configuration in the Amazon Elastic Container
* Service Developer Guide.
* Tasks hosted on Fargate only support the file
configuration file type.
*
* The options to use when configuring the log router. This field is optional and can be used to specify a custom
* configuration file or to add additional metadata, such as the task, task definition, cluster, and container
* instance details to the log event. If specified, the syntax to use is
* "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating
* a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer
* Guide.
*
* Tasks hosted on Fargate only support the file
configuration file type.
*
"options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}
* . For more information, see Creating a task definition that uses a FireLens configuration in the Amazon Elastic Container
* Service Developer Guide.
* Tasks hosted on Fargate only support the file
configuration file type.
*