Class: AWSCDK::ECS::CfnService::ServiceRegistryProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnService::ServiceRegistryProperty
- Defined in:
- ecs/cfn_service.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.
3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 |
# File 'ecs/cfn_service.rb', line 3122 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.
3139 3140 3141 |
# File 'ecs/cfn_service.rb', line 3139 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.
3146 3147 3148 |
# File 'ecs/cfn_service.rb', line 3146 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.
3153 3154 3155 |
# File 'ecs/cfn_service.rb', line 3153 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 .
3160 3161 3162 |
# File 'ecs/cfn_service.rb', line 3160 def registry_arn @registry_arn end |
Class Method Details
.jsii_properties ⇒ Object
3162 3163 3164 3165 3166 3167 3168 3169 |
# File 'ecs/cfn_service.rb', line 3162 def self.jsii_properties { :container_name => "containerName", :container_port => "containerPort", :port => "port", :registry_arn => "registryArn", } end |
Instance Method Details
#to_jsii ⇒ Object
3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 |
# File 'ecs/cfn_service.rb', line 3171 def to_jsii result = {} result.merge!({ "containerName" => @container_name, "containerPort" => @container_port, "port" => @port, "registryArn" => @registry_arn, }) result.compact end |