Skip to content
v2.278.0

PortRange Struct ​

The list of port ranges for the connections from clients to the accelerator.

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 portRange: globalaccelerator.PortRange = {
  fromPort: 123,

  // the properties below are optional
  toPort: 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_range = globalaccelerator.PortRange(
    from_port=123,

    # the properties below are optional
    to_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.*;

PortRange portRange = PortRange.builder()
        .fromPort(123)

        // the properties below are optional
        .toPort(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 portRange = new PortRange {
    FromPort = 123,

    // the properties below are optional
    ToPort = 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"

portRange := &PortRange{
	FromPort: jsii.Number(123),

	// the properties below are optional
	ToPort: jsii.Number(123),
}

Properties ​

fromPortnumberfrom_portint | floatfromPortNumberFromPortdoubleFromPort*float64 required #
The first port in the range of ports, inclusive.
toPortoptionalnumberto_portoptionalint | floattoPortoptionalNumberToPortoptionaldoubleToPortoptional*float64 #
The last port in the range of ports, inclusive.

Default: same as fromPort