Class: AWSCDK::ECS::GenericLogDriverProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::GenericLogDriverProps
- Defined in:
- ecs/generic_log_driver_props.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 ⇒ Hash{String => AWSCDK::ECS::Secret}?
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) ⇒ GenericLogDriverProps
constructor
A new instance of GenericLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(log_driver:, options: nil, secret_options: nil) ⇒ GenericLogDriverProps
Returns a new instance of GenericLogDriverProps.
10 11 12 13 14 15 16 17 |
# File 'ecs/generic_log_driver_props.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 = Jsii::Type.check_type(@secret_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuU2VjcmV0In0sImtpbmQiOiJtYXAifX0=")), "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 and splunk. For tasks using the EC2 launch type, the supported log drivers are awslogs, syslog, gelf, fluentd, splunk, journald, and json-file.
For more information about using the awslogs log driver, see Using the awslogs Log Driver in the Amazon Elastic Container Service Developer Guide.
32 33 34 |
# File 'ecs/generic_log_driver_props.rb', line 32 def log_driver @log_driver end |
#options ⇒ Hash{String => String}? (readonly)
Default: - the log driver options.
The configuration options to send to the log driver.
37 38 39 |
# File 'ecs/generic_log_driver_props.rb', line 37 def @options end |
#secret_options ⇒ Hash{String => AWSCDK::ECS::Secret}? (readonly)
Default: - no secret options provided.
The secrets to pass to the log configuration.
42 43 44 |
# File 'ecs/generic_log_driver_props.rb', line 42 def @secret_options end |
Class Method Details
.jsii_properties ⇒ Object
44 45 46 47 48 49 50 |
# File 'ecs/generic_log_driver_props.rb', line 44 def self.jsii_properties { :log_driver => "logDriver", :options => "options", :secret_options => "secretOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'ecs/generic_log_driver_props.rb', line 52 def to_jsii result = {} result.merge!({ "logDriver" => @log_driver, "options" => @options, "secretOptions" => @secret_options, }) result.compact end |