Class: AWSCDK::ServiceDiscovery::ServiceAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ServiceDiscovery::ServiceAttributes
- Defined in:
- service_discovery/service_attributes.rb
Instance Attribute Summary collapse
- #discovery_type ⇒ AWSCDK::ServiceDiscovery::DiscoveryType? readonly
- #dns_record_type ⇒ AWSCDK::ServiceDiscovery::DNSRecordType readonly
- #namespace ⇒ AWSCDK::ServiceDiscovery::INamespace readonly
- #routing_policy ⇒ AWSCDK::ServiceDiscovery::RoutingPolicy readonly
- #service_arn ⇒ String readonly
- #service_id ⇒ String readonly
- #service_name ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dns_record_type:, namespace:, routing_policy:, service_arn:, service_id:, service_name:, discovery_type: nil) ⇒ ServiceAttributes
constructor
A new instance of ServiceAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dns_record_type:, namespace:, routing_policy:, service_arn:, service_id:, service_name:, discovery_type: nil) ⇒ ServiceAttributes
Returns a new instance of ServiceAttributes.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'service_discovery/service_attributes.rb', line 13 def initialize(dns_record_type:, namespace:, routing_policy:, service_arn:, service_id:, service_name:, discovery_type: nil) @dns_record_type = dns_record_type Jsii::Type.check_type(@dns_record_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5EbnNSZWNvcmRUeXBlIn0=")), "dnsRecordType") @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5JTmFtZXNwYWNlIn0=")), "namespace") @routing_policy = routing_policy Jsii::Type.check_type(@routing_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5Sb3V0aW5nUG9saWN5In0=")), "routingPolicy") @service_arn = service_arn Jsii::Type.check_type(@service_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceArn") @service_id = service_id Jsii::Type.check_type(@service_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceId") @service_name = service_name Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") @discovery_type = discovery_type Jsii::Type.check_type(@discovery_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5EaXNjb3ZlcnlUeXBlIn0=")), "discoveryType") unless @discovery_type.nil? end |
Instance Attribute Details
#discovery_type ⇒ AWSCDK::ServiceDiscovery::DiscoveryType? (readonly)
43 44 45 |
# File 'service_discovery/service_attributes.rb', line 43 def discovery_type @discovery_type end |
#dns_record_type ⇒ AWSCDK::ServiceDiscovery::DNSRecordType (readonly)
31 32 33 |
# File 'service_discovery/service_attributes.rb', line 31 def dns_record_type @dns_record_type end |
#namespace ⇒ AWSCDK::ServiceDiscovery::INamespace (readonly)
33 34 35 |
# File 'service_discovery/service_attributes.rb', line 33 def namespace @namespace end |
#routing_policy ⇒ AWSCDK::ServiceDiscovery::RoutingPolicy (readonly)
35 36 37 |
# File 'service_discovery/service_attributes.rb', line 35 def routing_policy @routing_policy end |
#service_arn ⇒ String (readonly)
37 38 39 |
# File 'service_discovery/service_attributes.rb', line 37 def service_arn @service_arn end |
#service_id ⇒ String (readonly)
39 40 41 |
# File 'service_discovery/service_attributes.rb', line 39 def service_id @service_id end |
#service_name ⇒ String (readonly)
41 42 43 |
# File 'service_discovery/service_attributes.rb', line 41 def service_name @service_name end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'service_discovery/service_attributes.rb', line 45 def self.jsii_properties { :dns_record_type => "dnsRecordType", :namespace => "namespace", :routing_policy => "routingPolicy", :service_arn => "serviceArn", :service_id => "serviceId", :service_name => "serviceName", :discovery_type => "discoveryType", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'service_discovery/service_attributes.rb', line 57 def to_jsii result = {} result.merge!({ "dnsRecordType" => @dns_record_type, "namespace" => @namespace, "routingPolicy" => @routing_policy, "serviceArn" => @service_arn, "serviceId" => @service_id, "serviceName" => @service_name, "discoveryType" => @discovery_type, }) result.compact end |