EndpointGroupProps Struct
Property of the EndpointGroup.
| Source | aws-globalaccelerator/lib/endpoint-group.ts |
|---|---|
| Type last changed |
Example
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
# 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
// 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();
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
};
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
endpointGroupNameoptionalstringendpoint_group_nameoptionalstrendpointGroupNameoptionalStringEndpointGroupNameoptionalstringEndpointGroupNameoptional*string #Name of the endpoint group.
Default: logical ID of the resource
endpointsoptionalIEndpoint[]endpointsoptionaltyping.List[IEndpoint]endpointsoptionalList<IEndpoint>EndpointsoptionalIEndpoint[]Endpointsoptional*[]IEndpoint #Initial list of endpoints for this group.
Default: Group is initially empty
healthCheckIntervaloptionalDurationhealth_check_intervaloptionalDurationhealthCheckIntervaloptionalDurationHealthCheckIntervaloptionalDurationHealthCheckIntervaloptionalDuration = Duration.seconds(30) #The time between health checks for each endpoint.
Must be either 10 or 30 seconds.
healthCheckPathoptionalstringhealth_check_pathoptionalstrhealthCheckPathoptionalStringHealthCheckPathoptionalstringHealthCheckPathoptional*string = '/' #The ping path for health checks (if the protocol is HTTP(S)).
healthCheckPortoptionalnumberhealth_check_portoptionalint | floathealthCheckPortoptionalNumberHealthCheckPortoptionaldoubleHealthCheckPortoptional*float64 #The port used to perform health checks.
Default: The listener's port
healthCheckProtocoloptionalHealthCheckProtocolhealth_check_protocoloptionalHealthCheckProtocolhealthCheckProtocoloptionalHealthCheckProtocolHealthCheckProtocoloptionalHealthCheckProtocolHealthCheckProtocoloptionalHealthCheckProtocol = HealthCheckProtocol.TCP #The protocol used to perform health checks.
healthCheckThresholdoptionalnumberhealth_check_thresholdoptionalint | floathealthCheckThresholdoptionalNumberHealthCheckThresholdoptionaldoubleHealthCheckThresholdoptional*float64 = 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.
listenerIListenerReflistenerIListenerReflistenerIListenerRefListenerIListenerRefListenerIListenerRef required #The Amazon Resource Name (ARN) of the listener.
portOverridesoptionalPortOverride[]port_overridesoptionaltyping.List[PortOverride]portOverridesoptionalList<PortOverride>PortOverridesoptionalPortOverride[]PortOverridesoptional*[]PortOverride #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.
regionoptionalstringregionoptionalstrregionoptionalStringRegionoptionalstringRegionoptional*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
trafficDialPercentageoptionalnumbertraffic_dial_percentageoptionalint | floattrafficDialPercentageoptionalNumberTrafficDialPercentageoptionaldoubleTrafficDialPercentageoptional*float64 = 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.