SecurityGroupImportOptions

class aws_cdk.aws_ec2.SecurityGroupImportOptions(*, allow_all_ipv6_outbound=None, allow_all_outbound=None, mutable=None)

Bases: object

Additional options for imported security groups.

Parameters:
  • allow_all_ipv6_outbound (Optional[bool]) – Mark the SecurityGroup as having been created allowing all outbound ipv6 traffic. Only if this is set to false will egress rules for ipv6 be added to this security group. Be aware, this would undo any potential “all outbound traffic” default. Default: false

  • allow_all_outbound (Optional[bool]) – Mark the SecurityGroup as having been created allowing all outbound traffic. Only if this is set to false will egress rules be added to this security group. Be aware, this would undo any potential “all outbound traffic” default. Default: true

  • mutable (Optional[bool]) – If a SecurityGroup is mutable CDK can add rules to existing groups. Beware that making a SecurityGroup immutable might lead to issue due to missing ingress/egress rules for new resources. Default: true

ExampleMetadata:

infused

Example:

security_group = ec2.SecurityGroup.from_security_group_id(self, "SG", "sg-12345",
    mutable=False
)

Attributes

allow_all_ipv6_outbound

Mark the SecurityGroup as having been created allowing all outbound ipv6 traffic.

Only if this is set to false will egress rules for ipv6 be added to this security group. Be aware, this would undo any potential “all outbound traffic” default.

Default:

false

allow_all_outbound

Mark the SecurityGroup as having been created allowing all outbound traffic.

Only if this is set to false will egress rules be added to this security group. Be aware, this would undo any potential “all outbound traffic” default.

Default:

true

mutable

If a SecurityGroup is mutable CDK can add rules to existing groups.

Beware that making a SecurityGroup immutable might lead to issue due to missing ingress/egress rules for new resources.

Default:

true