Endpoint
- class aws_cdk.aws_docdb.Endpoint(address, port)
Bases:
object
Connection endpoint of a database cluster or instance.
Consists of a combination of hostname and port.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_docdb as docdb endpoint = docdb.Endpoint("address", 123)
Constructs an Endpoint instance.
- Parameters:
address (
str
) –The hostname or address of the endpoint.
port (
Union
[int
,float
]) –The port number of the endpoint.
Methods
- port_as_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.
- Return type:
str
- Returns:
An (un)resolved string representation of the endpoint’s port number
Attributes
- hostname
The hostname of the endpoint.
- port
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 {@link Endpoint.portAsString}.
- socket_address
The combination of
HOSTNAME:PORT
for this endpoint.