Class: AWSCDK::ServiceDiscovery::IPInstanceProps
- Inherits:
-
IPInstanceBaseProps
- Object
- IPInstanceBaseProps
- AWSCDK::ServiceDiscovery::IPInstanceProps
- Defined in:
- service_discovery/ip_instance_props.rb
Instance Attribute Summary collapse
-
#custom_attributes ⇒ Hash{String => String}?
readonly
Custom attributes of the instance.
-
#instance_id ⇒ String?
readonly
The id of the instance resource.
-
#ipv4 ⇒ String?
readonly
If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record.
-
#ipv6 ⇒ String?
readonly
If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record.
-
#port ⇒ Numeric?
readonly
The port on the endpoint that you want AWS Cloud Map to perform health checks on.
-
#service ⇒ AWSCDK::ServiceDiscovery::IService
readonly
The Cloudmap service this resource is registered to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil, service:) ⇒ IPInstanceProps
constructor
A new instance of IPInstanceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil, service:) ⇒ IPInstanceProps
Returns a new instance of IPInstanceProps.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'service_discovery/ip_instance_props.rb', line 12 def initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil, service:) @custom_attributes = custom_attributes Jsii::Type.check_type(@custom_attributes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "customAttributes") unless @custom_attributes.nil? @instance_id = instance_id Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceId") unless @instance_id.nil? @ipv4 = ipv4 Jsii::Type.check_type(@ipv4, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipv4") unless @ipv4.nil? @ipv6 = ipv6 Jsii::Type.check_type(@ipv6, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipv6") unless @ipv6.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @service = service Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5JU2VydmljZSJ9")), "service") end |
Instance Attribute Details
#custom_attributes ⇒ Hash{String => String}? (readonly)
Default: none
Custom attributes of the instance.
31 32 33 |
# File 'service_discovery/ip_instance_props.rb', line 31 def custom_attributes @custom_attributes end |
#instance_id ⇒ String? (readonly)
Default: Automatically generated name
The id of the instance resource.
36 37 38 |
# File 'service_discovery/ip_instance_props.rb', line 36 def instance_id @instance_id end |
#ipv4 ⇒ String? (readonly)
Default: none
If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record.
41 42 43 |
# File 'service_discovery/ip_instance_props.rb', line 41 def ipv4 @ipv4 end |
#ipv6 ⇒ String? (readonly)
Default: none
If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record.
46 47 48 |
# File 'service_discovery/ip_instance_props.rb', line 46 def ipv6 @ipv6 end |
#port ⇒ Numeric? (readonly)
Default: 80
The port on the endpoint that you want AWS Cloud Map to perform health checks on.
This value is also used for the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a default port that is applied to all instances in the Service configuration.
55 56 57 |
# File 'service_discovery/ip_instance_props.rb', line 55 def port @port end |
#service ⇒ AWSCDK::ServiceDiscovery::IService (readonly)
The Cloudmap service this resource is registered to.
59 60 61 |
# File 'service_discovery/ip_instance_props.rb', line 59 def service @service end |
Class Method Details
.jsii_properties ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'service_discovery/ip_instance_props.rb', line 61 def self.jsii_properties { :custom_attributes => "customAttributes", :instance_id => "instanceId", :ipv4 => "ipv4", :ipv6 => "ipv6", :port => "port", :service => "service", } end |
Instance Method Details
#to_jsii ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'service_discovery/ip_instance_props.rb', line 72 def to_jsii result = {} result.merge!(super) result.merge!({ "customAttributes" => @custom_attributes, "instanceId" => @instance_id, "ipv4" => @ipv4, "ipv6" => @ipv6, "port" => @port, "service" => @service, }) result.compact end |