interface PortProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.PortProps |
Java | software.amazon.awscdk.services.ec2.PortProps |
Python | aws_cdk.aws_ec2.PortProps |
TypeScript (source) | @aws-cdk/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 * as ec2 from '@aws-cdk/aws-ec2';
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.