# EndpointGroupProps

Property of the EndpointGroup.

Extends: [EndpointGroupOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.EndpointGroupOptions.html)
Used as props by: [EndpointGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.EndpointGroup.html)

- Source: [`aws-globalaccelerator/lib/endpoint-group.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-globalaccelerator/lib/endpoint-group.ts#L149)
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_globalaccelerator as globalaccelerator } from 'aws-cdk-lib';
import { aws_globalaccelerator as interfaces_globalaccelerator } from 'aws-cdk-lib/interfaces';

declare const endpoint: globalaccelerator.IEndpoint;
declare const listenerRef: interfaces_globalaccelerator.IListenerRef;
const endpointGroupProps: globalaccelerator.EndpointGroupProps = {
  listener: listenerRef,

  // the properties below are optional
  endpointGroupName: 'endpointGroupName',
  endpoints: [endpoint],
  healthCheckInterval: cdk.Duration.minutes(30),
  healthCheckPath: 'healthCheckPath',
  healthCheckPort: 123,
  healthCheckProtocol: globalaccelerator.HealthCheckProtocol.TCP,
  healthCheckThreshold: 123,
  portOverrides: [{
    endpointPort: 123,
    listenerPort: 123,
  }],
  region: 'region',
  trafficDialPercentage: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_globalaccelerator as globalaccelerator
from aws_cdk.interfaces import aws_globalaccelerator as interfaces_globalaccelerator

# endpoint: globalaccelerator.IEndpoint
# listener_ref: interfaces_globalaccelerator.IListenerRef

endpoint_group_props = globalaccelerator.EndpointGroupProps(
    listener=listener_ref,

    # the properties below are optional
    endpoint_group_name="endpointGroupName",
    endpoints=[endpoint],
    health_check_interval=cdk.Duration.minutes(30),
    health_check_path="healthCheckPath",
    health_check_port=123,
    health_check_protocol=globalaccelerator.HealthCheckProtocol.TCP,
    health_check_threshold=123,
    port_overrides=[globalaccelerator.PortOverride(
        endpoint_port=123,
        listener_port=123
    )],
    region="region",
    traffic_dial_percentage=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.*;
import software.amazon.awscdk.services.globalaccelerator.*;
import software.amazon.awscdk.interfaces.globalaccelerator.*;

IEndpoint endpoint;
IListenerRef listenerRef;

EndpointGroupProps endpointGroupProps = EndpointGroupProps.builder()
        .listener(listenerRef)

        // the properties below are optional
        .endpointGroupName("endpointGroupName")
        .endpoints(List.of(endpoint))
        .healthCheckInterval(Duration.minutes(30))
        .healthCheckPath("healthCheckPath")
        .healthCheckPort(123)
        .healthCheckProtocol(HealthCheckProtocol.TCP)
        .healthCheckThreshold(123)
        .portOverrides(List.of(PortOverride.builder()
                .endpointPort(123)
                .listenerPort(123)
                .build()))
        .region("region")
        .trafficDialPercentage(123)
        .build();
```

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;
using Amazon.CDK.AWS.GlobalAccelerator;
using Amazon.CDK.Interfaces.GlobalAccelerator;

IEndpoint endpoint;
IListenerRef listenerRef;

var endpointGroupProps = new EndpointGroupProps {
    Listener = listenerRef,

    // the properties below are optional
    EndpointGroupName = "endpointGroupName",
    Endpoints = new [] { endpoint },
    HealthCheckInterval = Duration.Minutes(30),
    HealthCheckPath = "healthCheckPath",
    HealthCheckPort = 123,
    HealthCheckProtocol = HealthCheckProtocol.TCP,
    HealthCheckThreshold = 123,
    PortOverrides = new [] { new PortOverride {
        EndpointPort = 123,
        ListenerPort = 123
    } },
    Region = "region",
    TrafficDialPercentage = 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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var endpoint IEndpoint
var listenerRef IListenerRef

endpointGroupProps := &EndpointGroupProps{
	Listener: listenerRef,

	// the properties below are optional
	EndpointGroupName: jsii.String("endpointGroupName"),
	Endpoints: []IEndpoint{
		endpoint,
	},
	HealthCheckInterval: cdk.Duration_Minutes(jsii.Number(30)),
	HealthCheckPath: jsii.String("healthCheckPath"),
	HealthCheckPort: jsii.Number(123),
	HealthCheckProtocol: awscdk.Aws_globalaccelerator.HealthCheckProtocol_TCP,
	HealthCheckThreshold: jsii.Number(123),
	PortOverrides: []PortOverride{
		&PortOverride{
			EndpointPort: jsii.Number(123),
			ListenerPort: jsii.Number(123),
		},
	},
	Region: jsii.String("region"),
	TrafficDialPercentage: jsii.Number(123),
}
```

## Properties

- `endpointGroupName`: string — Name of the endpoint group.

  **Default:** logical ID of the resource

- `endpoints`: [IEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.IEndpoint.html)[] — Initial list of endpoints for this group.

  **Default:** Group is initially empty

- `healthCheckInterval`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(30) — The time between health checks for each endpoint.

  Must be either 10 or 30 seconds.

- `healthCheckPath`: string = '/' — The ping path for health checks (if the protocol is HTTP(S)).

- `healthCheckPort`: number — The port used to perform health checks.

  **Default:** The listener's port

- `healthCheckProtocol`: [HealthCheckProtocol](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.HealthCheckProtocol.html) = HealthCheckProtocol.TCP — The protocol used to perform health checks.

- `healthCheckThreshold`: number = 3 — The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy.

- `listener`: [IListenerRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_globalaccelerator.IListenerRef.html) (required) — The Amazon Resource Name (ARN) of the listener.

- `portOverrides`: [PortOverride](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.PortOverride.html)[] — Override the destination ports used to route traffic to an endpoint.

  **Default:** No overrides

  Unless overridden, the port used to hit the endpoint will be the same as the port
  that traffic arrives on at the listener.

- `region`: string — The AWS Region where the endpoint group is located.

  **Default:** region of the first endpoint in this group, or the stack region if that region can't be determined

- `trafficDialPercentage`: number = 100 — The percentage of traffic to send to this AWS Region.

  The percentage is applied to the traffic that would otherwise have been
  routed to the Region based on optimal routing. Additional traffic is
  distributed to other endpoint groups for this listener.
