Skip to content
v2.278.0

PortOverrideProperty Struct ​

Override specific listener ports used to route traffic to endpoints that are part of an endpoint group.

For example, you can create a port override in which the listener receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.

For more information, see Port overrides in the AWS Global Accelerator Developer Guide .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_globalaccelerator as globalaccelerator } from 'aws-cdk-lib';
const portOverrideProperty: globalaccelerator.CfnEndpointGroup.PortOverrideProperty = {
  endpointPort: 123,
  listenerPort: 123,
};
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_globalaccelerator as globalaccelerator

port_override_property = globalaccelerator.CfnEndpointGroup.PortOverrideProperty(
    endpoint_port=123,
    listener_port=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.services.globalaccelerator.*;

PortOverrideProperty portOverrideProperty = PortOverrideProperty.builder()
        .endpointPort(123)
        .listenerPort(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.AWS.GlobalAccelerator;

var portOverrideProperty = new PortOverrideProperty {
    EndpointPort = 123,
    ListenerPort = 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 "github.com/aws/aws-cdk-go/awscdk"

portOverrideProperty := &PortOverrideProperty{
	EndpointPort: jsii.Number(123),
	ListenerPort: jsii.Number(123),
}

Properties ​

endpointPortnumberendpoint_portint | floatendpointPortNumberEndpointPortdoubleEndpointPort*float64 required #
The endpoint port that you want a listener port to be mapped to.

This is the port on the endpoint, such as the Application Load Balancer or Amazon EC2 instance.

listenerPortnumberlistener_portint | floatlistenerPortNumberListenerPortdoubleListenerPort*float64 required #
The listener port that you want to map to a specific endpoint port.

This is the port that user traffic arrives to the Global Accelerator on.