Class: AWSCDK::ECS::ServiceConnect

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

Overview

ServiceConnect ValueObjectClass having by ContainerDefinition.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(networkmode, pm) ⇒ ServiceConnect

Returns a new instance of ServiceConnect.

Parameters:



10
11
12
13
14
15
# File 'ecs/service_connect.rb', line 10

def initialize(networkmode, pm)
  pm = pm.is_a?(Hash) ? ::AWSCDK::ECS::PortMapping.new(**pm.transform_keys(&:to_sym)) : pm
  Jsii::Type.check_type(networkmode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLk5ldHdvcmtNb2RlIn0=")), "networkmode")
  Jsii::Type.check_type(pm, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlBvcnRNYXBwaW5nIn0=")), "pm")
  Jsii::Object.instance_method(:initialize).bind(self).call(networkmode, pm)
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
# File 'ecs/service_connect.rb', line 17

def self.jsii_overridable_methods
  {
    :networkmode => { kind: :property, name: "networkmode", is_optional: false },
    :portmapping => { kind: :property, name: "portmapping", is_optional: false },
    :is_service_connect => { kind: :method, name: "isServiceConnect", is_optional: false },
    :validate => { kind: :method, name: "validate", is_optional: false },
  }
end

Instance Method Details

#is_service_connectBoolean

Judge parameters can be serviceconnect logick.

If parameters can be serviceConnect return true.

Returns:

  • (Boolean)


45
46
47
# File 'ecs/service_connect.rb', line 45

def is_service_connect()
  jsii_call_method("isServiceConnect", [])
end

#networkmodeAWSCDK::ECS::NetworkMode

The networking mode to use for the containers in the task.



29
30
31
# File 'ecs/service_connect.rb', line 29

def networkmode()
  jsii_get_property("networkmode")
end

#portmappingAWSCDK::ECS::PortMapping

Port mappings allow containers to access ports on the host container instance to send or receive traffic.



36
37
38
# File 'ecs/service_connect.rb', line 36

def portmapping()
  jsii_get_property("portmapping")
end

#validatevoid

This method returns an undefined value.

Judge serviceconnect parametes are valid.

If invalid, throw Error.



54
55
56
# File 'ecs/service_connect.rb', line 54

def validate()
  jsii_call_method("validate", [])
end