Class: AWSCDK::Batch::CfnJobDefinition::LogConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnJobDefinition::LogConfigurationProperty
- Defined in:
- batch/cfn_job_definition.rb
Overview
Log configuration options to send to a custom log driver for the container.
Instance Attribute Summary collapse
-
#log_driver ⇒ String
readonly
The log driver to use for the container.
-
#options ⇒ Object?
readonly
The configuration options to send to the log driver.
-
#secret_options ⇒ AWSCDK::IResolvable, ...
readonly
The secrets to pass to the log configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(log_driver:, options: nil, secret_options: nil) ⇒ LogConfigurationProperty
constructor
A new instance of LogConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(log_driver:, options: nil, secret_options: nil) ⇒ LogConfigurationProperty
Returns a new instance of LogConfigurationProperty.
2422 2423 2424 2425 2426 2427 2428 2429 |
# File 'batch/cfn_job_definition.rb', line 2422 def initialize(log_driver:, options: nil, secret_options: nil) @log_driver = log_driver Jsii::Type.check_type(@log_driver, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logDriver") @options = Jsii::Type.check_type(@options, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "options") unless @options.nil? @secret_options = Jsii::Type.check_type(@secret_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5TZWNyZXRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "secretOptions") unless @secret_options.nil? end |
Instance Attribute Details
#log_driver ⇒ String (readonly)
The log driver to use for the container.
The valid values that are listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default.
The supported log drivers are awsfirelens , awslogs , fluentd , gelf , json-file , journald , logentries , syslog , and splunk .
Jobs that are running on Fargate resources are restricted to the
awslogsandsplunklog drivers.
- awsfirelens - Specifies the firelens logging driver. For more information on configuring Firelens, see Send Amazon ECS logs to an AWS service or AWS Partner in the Amazon Elastic Container Service Developer Guide .
- awslogs - Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver in the AWS Batch User Guide and Amazon CloudWatch Logs logging driver in the Docker documentation.
- fluentd - Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker documentation .
- gelf - Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and options, see Graylog Extended Format logging driver in the Docker documentation .
- journald - Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the Docker documentation .
- json-file - Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the Docker documentation .
- splunk - Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker documentation .
- syslog - Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker documentation .
If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that driver. We encourage you to submit pull requests for changes that you want to have included. However, Amazon Web Services doesn't currently support running modified copies of this software.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep "Server API version"
2454 2455 2456 |
# File 'batch/cfn_job_definition.rb', line 2454 def log_driver @log_driver end |
#options ⇒ Object? (readonly)
The configuration options to send to the log driver.
This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep "Server API version"
2461 2462 2463 |
# File 'batch/cfn_job_definition.rb', line 2461 def @options end |
#secret_options ⇒ AWSCDK::IResolvable, ... (readonly)
The secrets to pass to the log configuration.
For more information, see Specifying sensitive data in the AWS Batch User Guide .
2468 2469 2470 |
# File 'batch/cfn_job_definition.rb', line 2468 def @secret_options end |
Class Method Details
.jsii_properties ⇒ Object
2470 2471 2472 2473 2474 2475 2476 |
# File 'batch/cfn_job_definition.rb', line 2470 def self.jsii_properties { :log_driver => "logDriver", :options => "options", :secret_options => "secretOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
2478 2479 2480 2481 2482 2483 2484 2485 2486 |
# File 'batch/cfn_job_definition.rb', line 2478 def to_jsii result = {} result.merge!({ "logDriver" => @log_driver, "options" => @options, "secretOptions" => @secret_options, }) result.compact end |