Class: AWSCDK::ServiceDiscovery::BaseInstanceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ServiceDiscovery::BaseInstanceProps
- Defined in:
- service_discovery/base_instance_props.rb
Overview
Used when the resource that's associated with the service instance is accessible using values other than an IP address or a domain name (CNAME), i.e. for non-ip-instances.
Direct Known Subclasses
AliasTargetInstanceProps, CnameInstanceBaseProps, IPInstanceBaseProps, NonIPInstanceBaseProps
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_attributes: nil, instance_id: nil) ⇒ BaseInstanceProps
constructor
A new instance of BaseInstanceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_attributes: nil, instance_id: nil) ⇒ BaseInstanceProps
Returns a new instance of BaseInstanceProps.
9 10 11 12 13 14 |
# File 'service_discovery/base_instance_props.rb', line 9 def initialize(custom_attributes: nil, instance_id: 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? end |
Instance Attribute Details
#custom_attributes ⇒ Hash{String => String}? (readonly)
Note:
Default: none
Custom attributes of the instance.
20 21 22 |
# File 'service_discovery/base_instance_props.rb', line 20 def custom_attributes @custom_attributes end |
#instance_id ⇒ String? (readonly)
Note:
Default: Automatically generated name
The id of the instance resource.
25 26 27 |
# File 'service_discovery/base_instance_props.rb', line 25 def instance_id @instance_id end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'service_discovery/base_instance_props.rb', line 27 def self.jsii_properties { :custom_attributes => "customAttributes", :instance_id => "instanceId", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'service_discovery/base_instance_props.rb', line 34 def to_jsii result = {} result.merge!({ "customAttributes" => @custom_attributes, "instanceId" => @instance_id, }) result.compact end |