Class: AWSCDK::ECS::SyslogLogDriverProps

Inherits:
BaseLogDriverProps
  • Object
show all
Defined in:
ecs/syslog_log_driver_props.rb

Overview

Specifies the syslog log driver configuration options.

Source

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address: nil, facility: nil, format: nil, tls_ca_cert: nil, tls_cert: nil, tls_key: nil, tls_skip_verify: nil) ⇒ SyslogLogDriverProps

Returns a new instance of SyslogLogDriverProps.

Parameters:

  • env (Array<String>, nil) (defaults to: nil)

    The env option takes an array of keys.

  • env_regex (String, nil) (defaults to: nil)

    The env-regex option is similar to and compatible with env.

  • labels (Array<String>, nil) (defaults to: nil)

    The labels option takes an array of keys.

  • tag (String, nil) (defaults to: nil)

    By default, Docker uses the first 12 characters of the container ID to tag log messages.

  • address (String, nil) (defaults to: nil)

    The address of an external syslog server.

  • facility (String, nil) (defaults to: nil)

    The syslog facility to use.

  • format (String, nil) (defaults to: nil)

    The syslog message format to use.

  • tls_ca_cert (String, nil) (defaults to: nil)

    The absolute path to the trust certificates signed by the CA.

  • tls_cert (String, nil) (defaults to: nil)

    The absolute path to the TLS certificate file.

  • tls_key (String, nil) (defaults to: nil)

    The absolute path to the TLS key file.

  • tls_skip_verify (Boolean, nil) (defaults to: nil)

    If set to true, TLS verification is skipped when connecting to the syslog daemon.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'ecs/syslog_log_driver_props.rb', line 20

def initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address: nil, facility: nil, format: nil, tls_ca_cert: nil, tls_cert: nil, tls_key: nil, tls_skip_verify: 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?
  @address = address
  Jsii::Type.check_type(@address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "address") unless @address.nil?
  @facility = facility
  Jsii::Type.check_type(@facility, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "facility") unless @facility.nil?
  @format = format
  Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "format") unless @format.nil?
  @tls_ca_cert = tls_ca_cert
  Jsii::Type.check_type(@tls_ca_cert, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tlsCaCert") unless @tls_ca_cert.nil?
  @tls_cert = tls_cert
  Jsii::Type.check_type(@tls_cert, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tlsCert") unless @tls_cert.nil?
  @tls_key = tls_key
  Jsii::Type.check_type(@tls_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tlsKey") unless @tls_key.nil?
  @tls_skip_verify = tls_skip_verify
  Jsii::Type.check_type(@tls_skip_verify, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "tlsSkipVerify") unless @tls_skip_verify.nil?
end

Instance Attribute Details

#addressString? (readonly)

Note:

Default: - If the transport is tcp, udp, or tcp+tls, the default port is 514.

The address of an external syslog server.

The URI specifier may be [tcp|udp|tcp+tls]://host:port, unix://path, or unixgram://path.

Returns:

  • (String, nil)


87
88
89
# File 'ecs/syslog_log_driver_props.rb', line 87

def address
  @address
end

#envArray<String>? (readonly)

Note:

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.

Returns:

  • (Array<String>, nil)


53
54
55
# File 'ecs/syslog_log_driver_props.rb', line 53

def env
  @env
end

#env_regexString? (readonly)

Note:

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.

Returns:

  • (String, nil)


62
63
64
# File 'ecs/syslog_log_driver_props.rb', line 62

def env_regex
  @env_regex
end

#facilityString? (readonly)

Note:

Default: - facility not set

The syslog facility to use.

Can be the number or name for any valid syslog facility. See the syslog documentation: https://tools.ietf.org/html/rfc5424#section-6.2.1.

Returns:

  • (String, nil)


96
97
98
# File 'ecs/syslog_log_driver_props.rb', line 96

def facility
  @facility
end

#formatString? (readonly)

Note:

Default: - format not set

The syslog message format to use.

If not specified the local UNIX syslog format is used, without a specified hostname. Specify rfc3164 for the RFC-3164 compatible format, rfc5424 for RFC-5424 compatible format, or rfc5424micro for RFC-5424 compatible format with microsecond timestamp resolution.

Returns:

  • (String, nil)


106
107
108
# File 'ecs/syslog_log_driver_props.rb', line 106

def format
  @format
end

#labelsArray<String>? (readonly)

Note:

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.

Returns:

  • (Array<String>, nil)


71
72
73
# File 'ecs/syslog_log_driver_props.rb', line 71

def labels
  @labels
end

#tagString? (readonly)

Note:

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.

Returns:

  • (String, nil)


79
80
81
# File 'ecs/syslog_log_driver_props.rb', line 79

def tag
  @tag
end

#tls_ca_certString? (readonly)

Note:

Default: - tlsCaCert not set

The absolute path to the trust certificates signed by the CA.

Ignored if the address protocol is not tcp+tls.

Returns:

  • (String, nil)


114
115
116
# File 'ecs/syslog_log_driver_props.rb', line 114

def tls_ca_cert
  @tls_ca_cert
end

#tls_certString? (readonly)

Note:

Default: - tlsCert not set

The absolute path to the TLS certificate file.

Ignored if the address protocol is not tcp+tls.

Returns:

  • (String, nil)


122
123
124
# File 'ecs/syslog_log_driver_props.rb', line 122

def tls_cert
  @tls_cert
end

#tls_keyString? (readonly)

Note:

Default: - tlsKey not set

The absolute path to the TLS key file.

Ignored if the address protocol is not tcp+tls.

Returns:

  • (String, nil)


130
131
132
# File 'ecs/syslog_log_driver_props.rb', line 130

def tls_key
  @tls_key
end

#tls_skip_verifyBoolean? (readonly)

Note:

Default: - false

If set to true, TLS verification is skipped when connecting to the syslog daemon.

Ignored if the address protocol is not tcp+tls.

Returns:

  • (Boolean, nil)


137
138
139
# File 'ecs/syslog_log_driver_props.rb', line 137

def tls_skip_verify
  @tls_skip_verify
end

Class Method Details

.jsii_propertiesObject



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'ecs/syslog_log_driver_props.rb', line 139

def self.jsii_properties
  {
    :env => "env",
    :env_regex => "envRegex",
    :labels => "labels",
    :tag => "tag",
    :address => "address",
    :facility => "facility",
    :format => "format",
    :tls_ca_cert => "tlsCaCert",
    :tls_cert => "tlsCert",
    :tls_key => "tlsKey",
    :tls_skip_verify => "tlsSkipVerify",
  }
end

Instance Method Details

#to_jsiiObject



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'ecs/syslog_log_driver_props.rb', line 155

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "env" => @env,
    "envRegex" => @env_regex,
    "labels" => @labels,
    "tag" => @tag,
    "address" => @address,
    "facility" => @facility,
    "format" => @format,
    "tlsCaCert" => @tls_ca_cert,
    "tlsCert" => @tls_cert,
    "tlsKey" => @tls_key,
    "tlsSkipVerify" => @tls_skip_verify,
  })
  result.compact
end