Class: AWSCDK::ECS::GenericLogDriverProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/generic_log_driver_props.rb

Overview

The configuration to use when creating a log driver.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_driver:, options: nil, secret_options: nil) ⇒ GenericLogDriverProps

Returns a new instance of GenericLogDriverProps.

Parameters:

  • log_driver (String)

    The log driver to use for the container.

  • options (Hash{String => String}, nil) (defaults to: nil)

    The configuration options to send to the log driver.

  • secret_options (Hash{String => AWSCDK::ECS::Secret}, nil) (defaults to: nil)

    The secrets to pass to the log configuration.



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 = options
  Jsii::Type.check_type(@options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "options") unless @options.nil?
  @secret_options = secret_options
  Jsii::Type.check_type(@secret_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuU2VjcmV0In0sImtpbmQiOiJtYXAifX0=")), "secretOptions") unless @secret_options.nil?
end

Instance Attribute Details

#log_driverString (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.

Returns:

  • (String)


32
33
34
# File 'ecs/generic_log_driver_props.rb', line 32

def log_driver
  @log_driver
end

#optionsHash{String => String}? (readonly)

Note:

Default: - the log driver options.

The configuration options to send to the log driver.

Returns:

  • (Hash{String => String}, nil)


37
38
39
# File 'ecs/generic_log_driver_props.rb', line 37

def options
  @options
end

#secret_optionsHash{String => AWSCDK::ECS::Secret}? (readonly)

Note:

Default: - no secret options provided.

The secrets to pass to the log configuration.

Returns:



42
43
44
# File 'ecs/generic_log_driver_props.rb', line 42

def secret_options
  @secret_options
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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