Class Endpoint
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.docdb.Endpoint
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.918Z")
@Stability(Stable)
public class Endpoint
extends software.amazon.jsii.JsiiObject
Connection endpoint of a database cluster or instance.
Consists of a combination of hostname and port.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.docdb.*; Endpoint endpoint = new Endpoint("address", 123);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe hostname of the endpoint.getPort()
The port number of the endpoint.The combination ofHOSTNAME:PORT
for this endpoint.Returns the port number as a string representation that can be used for embedding within other strings.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Endpoint
protected Endpoint(software.amazon.jsii.JsiiObjectRef objRef) -
Endpoint
protected Endpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Endpoint
Constructs an Endpoint instance.- Parameters:
address
-- The hostname or address of the endpoint.
port
-- The port number of the endpoint.
-
-
Method Details
-
portAsString
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.
- Returns:
- An (un)resolved string representation of the endpoint's port number
-
getHostname
The hostname of the endpoint. -
getPort
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
. -
getSocketAddress
The combination ofHOSTNAME:PORT
for this endpoint.
-