Class: AWSCDK::ECS::ServiceConnect
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ECS::ServiceConnect
- Defined in:
- ecs/service_connect.rb
Overview
ServiceConnect ValueObjectClass having by ContainerDefinition.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(networkmode, pm) ⇒ ServiceConnect
constructor
A new instance of ServiceConnect.
-
#is_service_connect ⇒ Boolean
Judge parameters can be serviceconnect logick.
-
#networkmode ⇒ AWSCDK::ECS::NetworkMode
The networking mode to use for the containers in the task.
-
#portmapping ⇒ AWSCDK::ECS::PortMapping
Port mappings allow containers to access ports on the host container instance to send or receive traffic.
-
#validate ⇒ void
Judge serviceconnect parametes are valid.
Constructor Details
#initialize(networkmode, pm) ⇒ ServiceConnect
Returns a new instance of ServiceConnect.
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_methods ⇒ Object
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_connect ⇒ Boolean
Judge parameters can be serviceconnect logick.
If parameters can be serviceConnect return true.
45 46 47 |
# File 'ecs/service_connect.rb', line 45 def is_service_connect() jsii_call_method("isServiceConnect", []) end |
#networkmode ⇒ AWSCDK::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 |
#portmapping ⇒ AWSCDK::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 |
#validate ⇒ void
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 |