Class: AWSCDK::ECS::LogDriverConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::LogDriverConfig
- Defined in:
- ecs/log_driver_config.rb
Overview
The configuration to use when creating a log driver.
Instance Attribute Summary collapse
-
#log_driver ⇒ String
readonly
The log driver to use for the container.
-
#options ⇒ Hash{String => String}?
readonly
The configuration options to send to the log driver.
-
#secret_options ⇒ Array<AWSCDK::ECS::CfnTaskDefinition::SecretProperty>?
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) ⇒ LogDriverConfig
constructor
A new instance of LogDriverConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(log_driver:, options: nil, secret_options: nil) ⇒ LogDriverConfig
Returns a new instance of LogDriverConfig.
10 11 12 13 14 15 16 17 |
# File 'ecs/log_driver_config.rb', line 10 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("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "options") unless @options.nil? @secret_options = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECS::CfnTaskDefinition::SecretProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@secret_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuVGFza0RlZmluaXRpb24uU2VjcmV0UHJvcGVydHkifSwia2luZCI6ImFycmF5In19")), "secretOptions") unless @secret_options.nil? end |
Instance Attribute Details
#log_driver ⇒ String (readonly)
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.
37 38 39 |
# File 'ecs/log_driver_config.rb', line 37 def log_driver @log_driver end |
#options ⇒ Hash{String => String}? (readonly)
The configuration options to send to the log driver.
41 42 43 |
# File 'ecs/log_driver_config.rb', line 41 def @options end |
#secret_options ⇒ Array<AWSCDK::ECS::CfnTaskDefinition::SecretProperty>? (readonly)
Default: - No secret options provided.
The secrets to pass to the log configuration.
46 47 48 |
# File 'ecs/log_driver_config.rb', line 46 def @secret_options end |
Class Method Details
.jsii_properties ⇒ Object
48 49 50 51 52 53 54 |
# File 'ecs/log_driver_config.rb', line 48 def self.jsii_properties { :log_driver => "logDriver", :options => "options", :secret_options => "secretOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'ecs/log_driver_config.rb', line 56 def to_jsii result = {} result.merge!({ "logDriver" => @log_driver, "options" => @options, "secretOptions" => @secret_options, }) result.compact end |