aws-cdk-lib.aws_ec2.ConnectionsProps

interface ConnectionsProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.ConnectionsProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#ConnectionsProps
Javasoftware.amazon.awscdk.services.ec2.ConnectionsProps
Pythonaws_cdk.aws_ec2.ConnectionsProps
TypeScript (source)aws-cdk-lib » aws_ec2 » ConnectionsProps

Properties to intialize a new Connections object.

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';

declare const peer: ec2.IPeer;
declare const port: ec2.Port;
declare const securityGroup: ec2.SecurityGroup;
const connectionsProps: ec2.ConnectionsProps = {
  defaultPort: port,
  peer: peer,
  securityGroups: [securityGroup],
};

Properties

NameTypeDescription
defaultPort?PortDefault port range for initiating connections to and from this object.
peer?IPeerClass that represents the rule by which others can connect to this connectable.
securityGroups?ISecurityGroup[]What securityGroup(s) this object is managing connections for.

defaultPort?

Type: Port (optional, default: No default port)

Default port range for initiating connections to and from this object.


peer?

Type: IPeer (optional, default: Derived from securityGroup if set.)

Class that represents the rule by which others can connect to this connectable.

This object is required, but will be derived from securityGroup if that is passed.


securityGroups?

Type: ISecurityGroup[] (optional, default: No security groups)

What securityGroup(s) this object is managing connections for.