Class: AWSCDK::ECS::CfnTaskSet::ServiceRegistryProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskSet::ServiceRegistryProperty
- Defined in:
- ecs/cfn_task_set.rb
Overview
The details for the service registry.
Each service may be associated with one service registry. Multiple service registries for each service are not supported.
When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry configuration.
Instance Attribute Summary collapse
-
#container_name ⇒ String?
readonly
The container name value to be used for your service discovery service.
-
#container_port ⇒ Numeric?
readonly
The port value to be used for your service discovery service.
-
#port ⇒ Numeric?
readonly
The port value used if your service discovery service specified an SRV record.
-
#registry_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the service registry.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container_name: nil, container_port: nil, port: nil, registry_arn: nil) ⇒ ServiceRegistryProperty
constructor
A new instance of ServiceRegistryProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(container_name: nil, container_port: nil, port: nil, registry_arn: nil) ⇒ ServiceRegistryProperty
Returns a new instance of ServiceRegistryProperty.
986 987 988 989 990 991 992 993 994 995 |
# File 'ecs/cfn_task_set.rb', line 986 def initialize(container_name: nil, container_port: nil, port: nil, registry_arn: nil) @container_name = container_name Jsii::Type.check_type(@container_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerName") unless @container_name.nil? @container_port = container_port Jsii::Type.check_type(@container_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerPort") unless @container_port.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @registry_arn = registry_arn Jsii::Type.check_type(@registry_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "registryArn") unless @registry_arn.nil? end |
Instance Attribute Details
#container_name ⇒ String? (readonly)
The container name value to be used for your service discovery service.
It's already specified in the task definition. If the task definition that your service task specifies uses the bridge or host network mode, you must specify a container_name and container_port combination from the task definition. If the task definition that your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a container_name and container_port combination or a port value. However, you can't specify both.
1003 1004 1005 |
# File 'ecs/cfn_task_set.rb', line 1003 def container_name @container_name end |
#container_port ⇒ Numeric? (readonly)
The port value to be used for your service discovery service.
It's already specified in the task definition. If the task definition your service task specifies uses the bridge or host network mode, you must specify a container_name and container_port combination from the task definition. If the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a container_name and container_port combination or a port value. However, you can't specify both.
1010 1011 1012 |
# File 'ecs/cfn_task_set.rb', line 1010 def container_port @container_port end |
#port ⇒ Numeric? (readonly)
The port value used if your service discovery service specified an SRV record.
This field might be used if both the awsvpc network mode and SRV records are used.
1017 1018 1019 |
# File 'ecs/cfn_task_set.rb', line 1017 def port @port end |
#registry_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the service registry.
The currently supported service registry is AWS Cloud Map . For more information, see CreateService .
1024 1025 1026 |
# File 'ecs/cfn_task_set.rb', line 1024 def registry_arn @registry_arn end |
Class Method Details
.jsii_properties ⇒ Object
1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'ecs/cfn_task_set.rb', line 1026 def self.jsii_properties { :container_name => "containerName", :container_port => "containerPort", :port => "port", :registry_arn => "registryArn", } end |
Instance Method Details
#to_jsii ⇒ Object
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'ecs/cfn_task_set.rb', line 1035 def to_jsii result = {} result.merge!({ "containerName" => @container_name, "containerPort" => @container_port, "port" => @port, "registryArn" => @registry_arn, }) result.compact end |