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

    Constructors
    Modifier
    Constructor
    Description
     
    Endpoint(String address, Number port)
    Constructs an Endpoint instance.
    protected
    Endpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Endpoint(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The hostname of the endpoint.
    The port number of the endpoint.
    The combination of HOSTNAME: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

      @Stability(Stable) public Endpoint(@NotNull String address, @NotNull Number port)
      Constructs an Endpoint instance.

      Parameters:
      address -
      • The hostname or address of the endpoint.
      This parameter is required.
      port -
      • The port number of the endpoint.
      This parameter is required.
  • Method Details

    • portAsString

      @Stability(Stable) @NotNull public String 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

      @Stability(Stable) @NotNull public String getHostname()
      The hostname of the endpoint.
    • getPort

      @Stability(Stable) @NotNull public Number 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

      @Stability(Stable) @NotNull public String getSocketAddress()
      The combination of HOSTNAME:PORT for this endpoint.