PortRangeProperty
Struct External
Describes a range of ports.
| Source | |
|---|---|
| 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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
const portRangeProperty: ec2.CfnNetworkAclEntry.PortRangeProperty = {
from: 123,
to: 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_ec2 as ec2
port_range_property = ec2.CfnNetworkAclEntry.PortRangeProperty(
from=123,
to=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.ec2.*;
PortRangeProperty portRangeProperty = PortRangeProperty.builder()
.from(123)
.to(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.EC2;
var portRangeProperty = new PortRangeProperty {
From = 123,
To = 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"
portRangeProperty := &PortRangeProperty{
From: jsii.Number(123),
To: jsii.Number(123),
}
Properties
The first port in the range.
Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
The last port in the range.
Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.