Class: AWSCDK::ServiceDiscovery::IPInstanceBaseProps
- Inherits:
-
BaseInstanceProps
- Object
- BaseInstanceProps
- AWSCDK::ServiceDiscovery::IPInstanceBaseProps
- Defined in:
- service_discovery/ip_instance_base_props.rb
Direct Known Subclasses
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil) ⇒ IPInstanceBaseProps
constructor
A new instance of IPInstanceBaseProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil) ⇒ IPInstanceBaseProps
Returns a new instance of IPInstanceBaseProps.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'service_discovery/ip_instance_base_props.rb', line 11 def initialize(custom_attributes: nil, instance_id: nil, ipv4: nil, ipv6: nil, port: nil) @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? end |
Instance Attribute Details
#custom_attributes ⇒ Hash{String => String}? (readonly)
Default: none
Custom attributes of the instance.
28 29 30 |
# File 'service_discovery/ip_instance_base_props.rb', line 28 def custom_attributes @custom_attributes end |
#instance_id ⇒ String? (readonly)
Default: Automatically generated name
The id of the instance resource.
33 34 35 |
# File 'service_discovery/ip_instance_base_props.rb', line 33 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.
38 39 40 |
# File 'service_discovery/ip_instance_base_props.rb', line 38 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.
43 44 45 |
# File 'service_discovery/ip_instance_base_props.rb', line 43 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.
52 53 54 |
# File 'service_discovery/ip_instance_base_props.rb', line 52 def port @port end |
Class Method Details
.jsii_properties ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'service_discovery/ip_instance_base_props.rb', line 54 def self.jsii_properties { :custom_attributes => "customAttributes", :instance_id => "instanceId", :ipv4 => "ipv4", :ipv6 => "ipv6", :port => "port", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'service_discovery/ip_instance_base_props.rb', line 64 def to_jsii result = {} result.merge!(super) result.merge!({ "customAttributes" => @custom_attributes, "instanceId" => @instance_id, "ipv4" => @ipv4, "ipv6" => @ipv6, "port" => @port, }) result.compact end |