Class: AWSCDK::DocDB::Endpoint
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::DocDB::Endpoint
- Defined in:
- doc_db/endpoint.rb
Overview
Connection endpoint of a database cluster or instance.
Consists of a combination of hostname and port.
Class Method Summary collapse
Instance Method Summary collapse
-
#hostname ⇒ String
The hostname of the endpoint.
-
#initialize(address, port) ⇒ Endpoint
constructor
Constructs an Endpoint instance.
-
#port ⇒ Numeric
The port number of the endpoint.
-
#port_as_string ⇒ String
Returns the port number as a string representation that can be used for embedding within other strings.
-
#socket_address ⇒ String
The combination of
HOSTNAME:PORTfor this endpoint.
Constructor Details
#initialize(address, port) ⇒ Endpoint
Constructs an Endpoint instance.
14 15 16 17 18 |
# File 'doc_db/endpoint.rb', line 14 def initialize(address, port) Jsii::Type.check_type(address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "address") Jsii::Type.check_type(port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") Jsii::Object.instance_method(:initialize).bind(self).call(address, port) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'doc_db/endpoint.rb', line 20 def self.jsii_overridable_methods { :hostname => { kind: :property, name: "hostname", is_optional: false }, :port => { kind: :property, name: "port", is_optional: false }, :socket_address => { kind: :property, name: "socketAddress", is_optional: false }, :port_as_string => { kind: :method, name: "portAsString", is_optional: false }, } end |
Instance Method Details
#hostname ⇒ String
The hostname of the endpoint.
32 33 34 |
# File 'doc_db/endpoint.rb', line 32 def hostname() jsii_get_property("hostname") end |
#port ⇒ Numeric
The port number of the endpoint.
This can potentially be a CDK token. If you need to embed the port in a string (e.g. instance user data script),
use Endpoint.portAsString.
42 43 44 |
# File 'doc_db/endpoint.rb', line 42 def port() jsii_get_property("port") end |
#port_as_string ⇒ String
Returns the port number as a string representation that can be used for embedding within other strings.
This is intended to deal with CDK's token system. Numeric CDK tokens are not expanded when their string representation is embedded in a string. This function returns the port either as an unresolved string token or as a resolved string representation of the port value.
60 61 62 |
# File 'doc_db/endpoint.rb', line 60 def port_as_string() jsii_call_method("portAsString", []) end |
#socket_address ⇒ String
The combination of HOSTNAME:PORT for this endpoint.
49 50 51 |
# File 'doc_db/endpoint.rb', line 49 def socket_address() jsii_get_property("socketAddress") end |