# Endpoint

Connection endpoint of a database cluster or instance.

Consists of a combination of hostname and port.

- Source: [`aws-rds/lib/endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-rds/lib/endpoint.ts#L8)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rds as rds } from 'aws-cdk-lib';
const endpoint = new rds.Endpoint('address', 123);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_rds as rds

endpoint = rds.Endpoint("address", 123)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.rds.*;

Endpoint endpoint = new Endpoint("address", 123);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.RDS;

var endpoint = new Endpoint("address", 123);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

endpoint := awscdk.Aws_rds.NewEndpoint(jsii.String("address"), jsii.Number(123))
```

## Initializer

TypeScript:

```ts
new Endpoint(address: string, port: number)
```

Python:

```python
Endpoint(address: str, port: int | float)
```

Java:

```java
new Endpoint(String address, Number port)
```

C# / .NET:

```csharp
new Endpoint(string address, double port)
```

Golang:

```go
NewEndpoint(Address *string, Port *float64)
```

## Properties

- `hostname`: string — The hostname of the endpoint.

- `port`: number — The port of the endpoint.

- `socketAddress`: string — The combination of "HOSTNAME:PORT" for this endpoint.
