Class Endpoint
Connection endpoint of a database cluster or instance.
Inheritance
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Endpoint : DeputyBase
Syntax (vb)
Public Class Endpoint
Inherits DeputyBase
Remarks
Consists of a combination of hostname and port.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DocDB;
var endpoint = new Endpoint("address", 123);
Synopsis
Constructors
Endpoint(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Endpoint(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Endpoint(String, Double) | Constructs an Endpoint instance. |
Properties
Hostname | The hostname of the endpoint. |
Port | The port number of the endpoint. |
SocketAddress | The combination of |
Methods
PortAsString() | Returns the port number as a string representation that can be used for embedding within other strings. |
Constructors
Endpoint(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Endpoint(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Endpoint(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Endpoint(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Endpoint(String, Double)
Constructs an Endpoint instance.
public Endpoint(string address, double port)
Parameters
- address System.String
- The hostname or address of the endpoint.
- port System.Double
- The port number of the endpoint.
Properties
Hostname
The hostname of the endpoint.
public virtual string Hostname { get; }
Property Value
System.String
Port
The port number of the endpoint.
public virtual double Port { get; }
Property Value
System.Double
Remarks
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
.
SocketAddress
The combination of HOSTNAME:PORT
for this endpoint.
public virtual string SocketAddress { get; }
Property Value
System.String
Methods
PortAsString()
Returns the port number as a string representation that can be used for embedding within other strings.
public virtual string PortAsString()
Returns
System.String
An (un)resolved string representation of the endpoint's port number
Remarks
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.