Class: AWSCDK::ECS::BaseLogDriverProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::BaseLogDriverProps
- Defined in:
- ecs/base_log_driver_props.rb
Direct Known Subclasses
FireLensLogDriverProps, FluentdLogDriverProps, GelfLogDriverProps, JournaldLogDriverProps, JsonFileLogDriverProps, SplunkLogDriverProps, SyslogLogDriverProps
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.
-
#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) ⇒ BaseLogDriverProps
constructor
A new instance of BaseLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil) ⇒ BaseLogDriverProps
Returns a new instance of BaseLogDriverProps.
10 11 12 13 14 15 16 17 18 19 |
# File 'ecs/base_log_driver_props.rb', line 10 def initialize(env: nil, env_regex: nil, labels: nil, tag: 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? 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.
29 30 31 |
# File 'ecs/base_log_driver_props.rb', line 29 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.
38 39 40 |
# File 'ecs/base_log_driver_props.rb', line 38 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.
47 48 49 |
# File 'ecs/base_log_driver_props.rb', line 47 def labels @labels 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.
55 56 57 |
# File 'ecs/base_log_driver_props.rb', line 55 def tag @tag end |
Class Method Details
.jsii_properties ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'ecs/base_log_driver_props.rb', line 57 def self.jsii_properties { :env => "env", :env_regex => "envRegex", :labels => "labels", :tag => "tag", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'ecs/base_log_driver_props.rb', line 66 def to_jsii result = {} result.merge!({ "env" => @env, "envRegex" => @env_regex, "labels" => @labels, "tag" => @tag, }) result.compact end |