interface PortProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.PortProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#PortProps |
Java | software.amazon.awscdk.services.ec2.PortProps |
Python | aws_cdk.aws_ec2.PortProps |
TypeScript (source) | aws-cdk-lib » aws_ec2 » PortProps |
Properties to create a port range.
Example
// 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 portProps: ec2.PortProps = {
protocol: ec2.Protocol.ALL,
stringRepresentation: 'stringRepresentation',
// the properties below are optional
fromPort: 123,
toPort: 123,
};
Properties
Name | Type | Description |
---|---|---|
protocol | Protocol | The protocol for the range. |
string | string | String representation for this object. |
from | number | The starting port for the range. |
to | number | The ending port for the range. |
protocol
Type:
Protocol
The protocol for the range.
stringRepresentation
Type:
string
String representation for this object.
fromPort?
Type:
number
(optional, default: Not included in the rule)
The starting port for the range.
toPort?
Type:
number
(optional, default: Not included in the rule)
The ending port for the range.