Class: AWSCDK::ECS::ServiceConnectService
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::ServiceConnectService
- Defined in:
- ecs/service_connect_service.rb
Overview
Interface for service connect Service props.
Instance Attribute Summary collapse
-
#discovery_name ⇒ String?
readonly
Optionally specifies an intermediate dns name to register in the CloudMap namespace.
-
#dns_name ⇒ String?
readonly
The terse DNS alias to use for this port mapping in the service connect mesh.
-
#idle_timeout ⇒ AWSCDK::Duration?
readonly
The amount of time in seconds a connection for Service Connect will stay active while idle.
-
#ingress_port_override ⇒ Numeric?
readonly
Optional.
-
#per_request_timeout ⇒ AWSCDK::Duration?
readonly
The amount of time waiting for the upstream to respond with a complete response per request for Service Connect.
-
#port ⇒ Numeric?
readonly
The port for clients to use to communicate with this service via Service Connect.
-
#port_mapping_name ⇒ String
readonly
portMappingName specifies which port and protocol combination should be used for this service connect service.
-
#tls ⇒ AWSCDK::ECS::ServiceConnectTLSConfiguration?
readonly
A reference to an object that represents a Transport Layer Security (TLS) configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(port_mapping_name:, discovery_name: nil, dns_name: nil, idle_timeout: nil, ingress_port_override: nil, per_request_timeout: nil, port: nil, tls: nil) ⇒ ServiceConnectService
constructor
A new instance of ServiceConnectService.
- #to_jsii ⇒ Object
Constructor Details
#initialize(port_mapping_name:, discovery_name: nil, dns_name: nil, idle_timeout: nil, ingress_port_override: nil, per_request_timeout: nil, port: nil, tls: nil) ⇒ ServiceConnectService
Returns a new instance of ServiceConnectService.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'ecs/service_connect_service.rb', line 15 def initialize(port_mapping_name:, discovery_name: nil, dns_name: nil, idle_timeout: nil, ingress_port_override: nil, per_request_timeout: nil, port: nil, tls: nil) @port_mapping_name = port_mapping_name Jsii::Type.check_type(@port_mapping_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "portMappingName") @discovery_name = discovery_name Jsii::Type.check_type(@discovery_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "discoveryName") unless @discovery_name.nil? @dns_name = dns_name Jsii::Type.check_type(@dns_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dnsName") unless @dns_name.nil? @idle_timeout = idle_timeout Jsii::Type.check_type(@idle_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "idleTimeout") unless @idle_timeout.nil? @ingress_port_override = ingress_port_override Jsii::Type.check_type(@ingress_port_override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ingressPortOverride") unless @ingress_port_override.nil? @per_request_timeout = per_request_timeout Jsii::Type.check_type(@per_request_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "perRequestTimeout") unless @per_request_timeout.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @tls = tls.is_a?(Hash) ? ::AWSCDK::ECS::ServiceConnectTLSConfiguration.new(**tls.transform_keys(&:to_sym)) : tls Jsii::Type.check_type(@tls, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlcnZpY2VDb25uZWN0VGxzQ29uZmlndXJhdGlvbiJ9")), "tls") unless @tls.nil? end |
Instance Attribute Details
#discovery_name ⇒ String? (readonly)
Default: - port mapping name
Optionally specifies an intermediate dns name to register in the CloudMap namespace.
This is required if you wish to use the same port mapping name in more than one service.
44 45 46 |
# File 'ecs/service_connect_service.rb', line 44 def discovery_name @discovery_name end |
#dns_name ⇒ String? (readonly)
Default: - No alias is created. The service is reachable at portMappingName.namespace:port.
The terse DNS alias to use for this port mapping in the service connect mesh.
Service Connect-enabled clients will be able to reach this service at http://dnsName:port.
52 53 54 |
# File 'ecs/service_connect_service.rb', line 52 def dns_name @dns_name end |
#idle_timeout ⇒ AWSCDK::Duration? (readonly)
Default: - Duration.minutes(5) for HTTP/HTTP2/GRPC, Duration.hours(1) for TCP.
The amount of time in seconds a connection for Service Connect will stay active while idle.
A value of 0 can be set to disable idle_timeout.
If idle_timeout is set to a time that is less than per_request_timeout, the connection will close
when the idle_timeout is reached and not the per_request_timeout.
62 63 64 |
# File 'ecs/service_connect_service.rb', line 62 def idle_timeout @idle_timeout end |
#ingress_port_override ⇒ Numeric? (readonly)
Default: - none
Optional.
The port on the Service Connect agent container to use for traffic ingress to this service.
69 70 71 |
# File 'ecs/service_connect_service.rb', line 69 def ingress_port_override @ingress_port_override end |
#per_request_timeout ⇒ AWSCDK::Duration? (readonly)
Default: - Duration.seconds(15)
The amount of time waiting for the upstream to respond with a complete response per request for Service Connect.
A value of 0 can be set to disable per_request_timeout.
Can only be set when the app_protocol for the application container is HTTP/HTTP2/GRPC.
If idle_timeout is set to a time that is less than per_request_timeout, the connection will close
when the idle_timeout is reached and not the per_request_timeout.
80 81 82 |
# File 'ecs/service_connect_service.rb', line 80 def per_request_timeout @per_request_timeout end |
#port ⇒ Numeric? (readonly)
Default: the container port specified by the port mapping in portMappingName.
The port for clients to use to communicate with this service via Service Connect.
85 86 87 |
# File 'ecs/service_connect_service.rb', line 85 def port @port end |
#port_mapping_name ⇒ String (readonly)
portMappingName specifies which port and protocol combination should be used for this service connect service.
37 38 39 |
# File 'ecs/service_connect_service.rb', line 37 def port_mapping_name @port_mapping_name end |
#tls ⇒ AWSCDK::ECS::ServiceConnectTLSConfiguration? (readonly)
Default: - none
A reference to an object that represents a Transport Layer Security (TLS) configuration.
90 91 92 |
# File 'ecs/service_connect_service.rb', line 90 def tls @tls end |
Class Method Details
.jsii_properties ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'ecs/service_connect_service.rb', line 92 def self.jsii_properties { :port_mapping_name => "portMappingName", :discovery_name => "discoveryName", :dns_name => "dnsName", :idle_timeout => "idleTimeout", :ingress_port_override => "ingressPortOverride", :per_request_timeout => "perRequestTimeout", :port => "port", :tls => "tls", } end |
Instance Method Details
#to_jsii ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'ecs/service_connect_service.rb', line 105 def to_jsii result = {} result.merge!({ "portMappingName" => @port_mapping_name, "discoveryName" => @discovery_name, "dnsName" => @dns_name, "idleTimeout" => @idle_timeout, "ingressPortOverride" => @ingress_port_override, "perRequestTimeout" => @per_request_timeout, "port" => @port, "tls" => @tls, }) result.compact end |