Class: AWSCDK::ECS::CfnService::ServiceConnectServiceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnService::ServiceConnectServiceProperty
- Defined in:
- ecs/cfn_service.rb
Overview
The Service Connect service object configuration.
For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide .
Instance Attribute Summary collapse
-
#client_aliases ⇒ AWSCDK::IResolvable, ...
readonly
The list of client aliases for this Service Connect service.
-
#discovery_name ⇒ String?
readonly
The
discoveryNameis the name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service. -
#ingress_port_override ⇒ Numeric?
readonly
The port number for the Service Connect proxy to listen on.
-
#port_name ⇒ String
readonly
The
portNamemust match the name of one of theportMappingsfrom all the containers in the task definition of this Amazon ECS service. -
#timeout ⇒ AWSCDK::IResolvable, ...
readonly
A reference to an object that represents the configured timeouts for Service Connect.
-
#tls ⇒ AWSCDK::IResolvable, ...
readonly
A reference to an object that represents a Transport Layer Security (TLS) configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(port_name:, client_aliases: nil, discovery_name: nil, ingress_port_override: nil, timeout: nil, tls: nil) ⇒ ServiceConnectServiceProperty
constructor
A new instance of ServiceConnectServiceProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(port_name:, client_aliases: nil, discovery_name: nil, ingress_port_override: nil, timeout: nil, tls: nil) ⇒ ServiceConnectServiceProperty
Returns a new instance of ServiceConnectServiceProperty.
2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 |
# File 'ecs/cfn_service.rb', line 2636 def initialize(port_name:, client_aliases: nil, discovery_name: nil, ingress_port_override: nil, timeout: nil, tls: nil) @port_name = port_name Jsii::Type.check_type(@port_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "portName") @client_aliases = client_aliases Jsii::Type.check_type(@client_aliases, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuU2VydmljZUNvbm5lY3RDbGllbnRBbGlhc1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "clientAliases") unless @client_aliases.nil? @discovery_name = discovery_name Jsii::Type.check_type(@discovery_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "discoveryName") unless @discovery_name.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? @timeout = timeout.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::TimeoutConfigurationProperty.new(**timeout.transform_keys(&:to_sym)) : timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5UaW1lb3V0Q29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "timeout") unless @timeout.nil? @tls = tls.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::ServiceConnectTLSConfigurationProperty.new(**tls.transform_keys(&:to_sym)) : tls Jsii::Type.check_type(@tls, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5TZXJ2aWNlQ29ubmVjdFRsc0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "tls") unless @tls.nil? end |
Instance Attribute Details
#client_aliases ⇒ AWSCDK::IResolvable, ... (readonly)
The list of client aliases for this Service Connect service.
You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1.
Each alias ("endpoint") is a fully-qualified name and port number that other Amazon ECS tasks ("clients") can use to connect to this service.
Each name and port mapping must be unique within the namespace.
For each ServiceConnectService , you must provide at least one client_alias with one port .
2668 2669 2670 |
# File 'ecs/cfn_service.rb', line 2668 def client_aliases @client_aliases end |
#discovery_name ⇒ String? (readonly)
The discoveryName is the name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
This must be unique within the AWS Cloud Map namespace. The name can contain up to 64 characters. The name can include lowercase letters, numbers, underscores (_), and hyphens (-). The name can't start with a hyphen.
If the discovery_name isn't specified, the port mapping name from the task definition is used in portName.namespace .
2677 2678 2679 |
# File 'ecs/cfn_service.rb', line 2677 def discovery_name @discovery_name end |
#ingress_port_override ⇒ Numeric? (readonly)
The port number for the Service Connect proxy to listen on.
Use the value of this field to bypass the proxy for traffic on the port number specified in the named port_mapping in the task definition of this application, and then use it in your VPC security groups to allow traffic into the proxy for this Amazon ECS service.
In awsvpc mode and Fargate, the default value is the container port number. The container port number is in the port_mapping in the task definition. In bridge mode, the default value is the ephemeral port of the Service Connect proxy.
2686 2687 2688 |
# File 'ecs/cfn_service.rb', line 2686 def ingress_port_override @ingress_port_override end |
#port_name ⇒ String (readonly)
The portName must match the name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.
2655 2656 2657 |
# File 'ecs/cfn_service.rb', line 2655 def port_name @port_name end |
#timeout ⇒ AWSCDK::IResolvable, ... (readonly)
A reference to an object that represents the configured timeouts for Service Connect.
2691 2692 2693 |
# File 'ecs/cfn_service.rb', line 2691 def timeout @timeout end |
#tls ⇒ AWSCDK::IResolvable, ... (readonly)
A reference to an object that represents a Transport Layer Security (TLS) configuration.
2696 2697 2698 |
# File 'ecs/cfn_service.rb', line 2696 def tls @tls end |
Class Method Details
.jsii_properties ⇒ Object
2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 |
# File 'ecs/cfn_service.rb', line 2698 def self.jsii_properties { :port_name => "portName", :client_aliases => "clientAliases", :discovery_name => "discoveryName", :ingress_port_override => "ingressPortOverride", :timeout => "timeout", :tls => "tls", } end |
Instance Method Details
#to_jsii ⇒ Object
2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 |
# File 'ecs/cfn_service.rb', line 2709 def to_jsii result = {} result.merge!({ "portName" => @port_name, "clientAliases" => @client_aliases, "discoveryName" => @discovery_name, "ingressPortOverride" => @ingress_port_override, "timeout" => @timeout, "tls" => @tls, }) result.compact end |