Class: AWSCDK::ECS::CloudMapOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CloudMapOptions
- Defined in:
- ecs/cloud_map_options.rb
Overview
The options to enabling AWS Cloud Map for an Amazon ECS service.
Instance Attribute Summary collapse
-
#cloud_map_namespace ⇒ AWSCDK::ServiceDiscovery::INamespace?
readonly
The service discovery namespace for the Cloud Map service to attach to the ECS service.
-
#container ⇒ AWSCDK::ECS::ContainerDefinition?
readonly
The container to point to for a SRV record.
-
#container_port ⇒ Numeric?
readonly
The port to point to for a SRV record.
-
#dns_record_type ⇒ AWSCDK::ServiceDiscovery::DNSRecordType?
readonly
The DNS record type that you want AWS Cloud Map to create.
-
#dns_ttl ⇒ AWSCDK::Duration?
readonly
The amount of time that you want DNS resolvers to cache the settings for this record.
-
#failure_threshold ⇒ Numeric?
readonly
The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance.
-
#name ⇒ String?
readonly
The name of the Cloud Map service to attach to the ECS service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cloud_map_namespace: nil, container: nil, container_port: nil, dns_record_type: nil, dns_ttl: nil, failure_threshold: nil, name: nil) ⇒ CloudMapOptions
constructor
A new instance of CloudMapOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cloud_map_namespace: nil, container: nil, container_port: nil, dns_record_type: nil, dns_ttl: nil, failure_threshold: nil, name: nil) ⇒ CloudMapOptions
Returns a new instance of CloudMapOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'ecs/cloud_map_options.rb', line 14 def initialize(cloud_map_namespace: nil, container: nil, container_port: nil, dns_record_type: nil, dns_ttl: nil, failure_threshold: nil, name: nil) @cloud_map_namespace = cloud_map_namespace Jsii::Type.check_type(@cloud_map_namespace, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5JTmFtZXNwYWNlIn0=")), "cloudMapNamespace") unless @cloud_map_namespace.nil? @container = container Jsii::Type.check_type(@container, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lckRlZmluaXRpb24ifQ==")), "container") unless @container.nil? @container_port = container_port Jsii::Type.check_type(@container_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerPort") unless @container_port.nil? @dns_record_type = dns_record_type Jsii::Type.check_type(@dns_record_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5EbnNSZWNvcmRUeXBlIn0=")), "dnsRecordType") unless @dns_record_type.nil? @dns_ttl = dns_ttl Jsii::Type.check_type(@dns_ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "dnsTtl") unless @dns_ttl.nil? @failure_threshold = failure_threshold Jsii::Type.check_type(@failure_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "failureThreshold") unless @failure_threshold.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? end |
Instance Attribute Details
#cloud_map_namespace ⇒ AWSCDK::ServiceDiscovery::INamespace? (readonly)
Default: - the defaultCloudMapNamespace associated to the cluster
The service discovery namespace for the Cloud Map service to attach to the ECS service.
35 36 37 |
# File 'ecs/cloud_map_options.rb', line 35 def cloud_map_namespace @cloud_map_namespace end |
#container ⇒ AWSCDK::ECS::ContainerDefinition? (readonly)
Default: - the task definition's default container
The container to point to for a SRV record.
40 41 42 |
# File 'ecs/cloud_map_options.rb', line 40 def container @container end |
#container_port ⇒ Numeric? (readonly)
Default: - the default port of the task definition's default container
The port to point to for a SRV record.
45 46 47 |
# File 'ecs/cloud_map_options.rb', line 45 def container_port @container_port end |
#dns_record_type ⇒ AWSCDK::ServiceDiscovery::DNSRecordType? (readonly)
Default: - DnsRecordType.A if TaskDefinition.networkMode = AWS_VPC, otherwise DnsRecordType.SRV
The DNS record type that you want AWS Cloud Map to create.
The supported record types are A or SRV.
52 53 54 |
# File 'ecs/cloud_map_options.rb', line 52 def dns_record_type @dns_record_type end |
#dns_ttl ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(1)
The amount of time that you want DNS resolvers to cache the settings for this record.
57 58 59 |
# File 'ecs/cloud_map_options.rb', line 57 def dns_ttl @dns_ttl end |
#failure_threshold ⇒ Numeric? (readonly)
The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance.
NOTE: This is used for HealthCheckCustomConfig
63 64 65 |
# File 'ecs/cloud_map_options.rb', line 63 def failure_threshold @failure_threshold end |
#name ⇒ String? (readonly)
Default: CloudFormation-generated name
The name of the Cloud Map service to attach to the ECS service.
68 69 70 |
# File 'ecs/cloud_map_options.rb', line 68 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'ecs/cloud_map_options.rb', line 70 def self.jsii_properties { :cloud_map_namespace => "cloudMapNamespace", :container => "container", :container_port => "containerPort", :dns_record_type => "dnsRecordType", :dns_ttl => "dnsTtl", :failure_threshold => "failureThreshold", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'ecs/cloud_map_options.rb', line 82 def to_jsii result = {} result.merge!({ "cloudMapNamespace" => @cloud_map_namespace, "container" => @container, "containerPort" => @container_port, "dnsRecordType" => @dns_record_type, "dnsTtl" => @dns_ttl, "failureThreshold" => @failure_threshold, "name" => @name, }) result.compact end |