Class: AWSCDK::ECS::LogDriver

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

Overview

The base class for log drivers.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogDriver

Returns a new instance of LogDriver.



8
9
10
# File 'ecs/log_driver.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.aws_logs(props) ⇒ AWSCDK::ECS::LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs.

Parameters:

Returns:

  • (AWSCDK::ECS::LogDriver)


22
23
24
25
26
# File 'ecs/log_driver.rb', line 22

def self.aws_logs(props)
  props = props.is_a?(Hash) ? ::AWSCDK::ECS::AWSLogDriverProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkF3c0xvZ0RyaXZlclByb3BzIn0=")), "props")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.LogDriver", "awsLogs", [props])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'ecs/log_driver.rb', line 12

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(scope, container_definition) ⇒ AWSCDK::ECS::LogDriverConfig

Called when the log driver is configured on a container.

Parameters:

Returns:



33
34
35
36
37
# File 'ecs/log_driver.rb', line 33

def bind(scope, container_definition)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(container_definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lckRlZmluaXRpb24ifQ==")), "containerDefinition")
  jsii_call_method("bind", [scope, container_definition])
end