ConnectionsProps

class aws_cdk.aws_ec2.ConnectionsProps(*, default_port=None, peer=None, security_groups=None)

Bases: object

Properties to intialize a new Connections object.

Parameters:
  • default_port (Optional[Port]) – Default port range for initiating connections to and from this object. Default: - No default port

  • peer (Optional[IPeer]) – 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. Default: Derived from securityGroup if set.

  • security_groups (Optional[Sequence[ISecurityGroup]]) – What securityGroup(s) this object is managing connections for. Default: No security groups

ExampleMetadata:

fixture=_generated

Example:

# 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

# peer: ec2.IPeer
# port: ec2.Port
# security_group: ec2.SecurityGroup

connections_props = ec2.ConnectionsProps(
    default_port=port,
    peer=peer,
    security_groups=[security_group]
)

Attributes

default_port

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

Default:
  • No default port

peer

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.

Default:

Derived from securityGroup if set.

security_groups

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

Default:

No security groups