Class: AWSCDK::ServiceDiscovery::BaseInstanceProps

Inherits:
Jsii::Struct
  • Object
show all
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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(custom_attributes: nil, instance_id: nil) ⇒ BaseInstanceProps

Returns a new instance of BaseInstanceProps.

Parameters:

  • custom_attributes (Hash{String => String}, nil) (defaults to: nil)

    Custom attributes of the instance.

  • instance_id (String, nil) (defaults to: nil)

    The id of the instance resource.



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_attributesHash{String => String}? (readonly)

Note:

Default: none

Custom attributes of the instance.

Returns:

  • (Hash{String => String}, nil)


20
21
22
# File 'service_discovery/base_instance_props.rb', line 20

def custom_attributes
  @custom_attributes
end

#instance_idString? (readonly)

Note:

Default: Automatically generated name

The id of the instance resource.

Returns:

  • (String, nil)


25
26
27
# File 'service_discovery/base_instance_props.rb', line 25

def instance_id
  @instance_id
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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