Class: AWSCDK::ECS::FireLensLogDriverProps
- Inherits:
-
BaseLogDriverProps
- Object
- BaseLogDriverProps
- AWSCDK::ECS::FireLensLogDriverProps
- Defined in:
- ecs/fire_lens_log_driver_props.rb
Overview
Specifies the firelens log driver configuration options.
Instance Attribute Summary collapse
-
#env ⇒ Array<String>?
readonly
The env option takes an array of keys.
-
#env_regex ⇒ String?
readonly
The env-regex option is similar to and compatible with env.
-
#labels ⇒ Array<String>?
readonly
The labels option takes an array of keys.
-
#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.
-
#tag ⇒ String?
readonly
By default, Docker uses the first 12 characters of the container ID to tag log messages.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, options: nil, secret_options: nil) ⇒ FireLensLogDriverProps
constructor
A new instance of FireLensLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, options: nil, secret_options: nil) ⇒ FireLensLogDriverProps
Returns a new instance of FireLensLogDriverProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ecs/fire_lens_log_driver_props.rb', line 13 def initialize(env: nil, env_regex: nil, labels: nil, tag: nil, options: nil, secret_options: nil) @env = env Jsii::Type.check_type(@env, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "env") unless @env.nil? @env_regex = env_regex Jsii::Type.check_type(@env_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "envRegex") unless @env_regex.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "labels") unless @labels.nil? @tag = tag Jsii::Type.check_type(@tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless @tag.nil? @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
#env ⇒ Array<String>? (readonly)
Default: - No env
The env option takes an array of keys.
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
36 37 38 |
# File 'ecs/fire_lens_log_driver_props.rb', line 36 def env @env end |
#env_regex ⇒ String? (readonly)
Default: - No envRegex
The env-regex option is similar to and compatible with env.
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
45 46 47 |
# File 'ecs/fire_lens_log_driver_props.rb', line 45 def env_regex @env_regex end |
#labels ⇒ Array<String>? (readonly)
Default: - No labels
The labels option takes an array of keys.
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
54 55 56 |
# File 'ecs/fire_lens_log_driver_props.rb', line 54 def labels @labels end |
#options ⇒ Hash{String => String}? (readonly)
Default: - the log driver options
The configuration options to send to the log driver.
67 68 69 |
# File 'ecs/fire_lens_log_driver_props.rb', line 67 def @options end |
#secret_options ⇒ Hash{String => AWSCDK::ECS::Secret}? (readonly)
Default: - No secret options provided.
The secrets to pass to the log configuration.
72 73 74 |
# File 'ecs/fire_lens_log_driver_props.rb', line 72 def @secret_options end |
#tag ⇒ String? (readonly)
Default: - The first 12 characters of the container ID
By default, Docker uses the first 12 characters of the container ID to tag log messages.
Refer to the log tag option documentation for customizing the log tag format.
62 63 64 |
# File 'ecs/fire_lens_log_driver_props.rb', line 62 def tag @tag end |
Class Method Details
.jsii_properties ⇒ Object
74 75 76 77 78 79 80 81 82 83 |
# File 'ecs/fire_lens_log_driver_props.rb', line 74 def self.jsii_properties { :env => "env", :env_regex => "envRegex", :labels => "labels", :tag => "tag", :options => "options", :secret_options => "secretOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'ecs/fire_lens_log_driver_props.rb', line 85 def to_jsii result = {} result.merge!(super) result.merge!({ "env" => @env, "envRegex" => @env_regex, "labels" => @labels, "tag" => @tag, "options" => @options, "secretOptions" => @secret_options, }) result.compact end |