CfnSecurityGroupProps
- class aws_cdk.aws_ec2.CfnSecurityGroupProps(*, group_description, group_name=None, security_group_egress=None, security_group_ingress=None, tags=None, vpc_id=None)
Bases:
object
Properties for defining a
CfnSecurityGroup
.- Parameters:
group_description (
str
) – A description for the security group. Constraints: Up to 255 characters in length Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*group_name (
Optional
[str
]) – The name of the security group. Constraints: Up to 255 characters in length. Cannot start withsg-
. Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*security_group_egress (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,EgressProperty
,Dict
[str
,Any
]]],None
]) – The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.security_group_ingress (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,IngressProperty
,Dict
[str
,Any
]]],None
]) – The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – Any tags assigned to the security group.vpc_id (
Optional
[str
]) – The ID of the VPC for the security group. If you do not specify a VPC, the default is to use the default VPC for the Region. If there’s no specified VPC and no default VPC, security group creation fails.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html
- 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 cfn_security_group_props = ec2.CfnSecurityGroupProps( group_description="groupDescription", # the properties below are optional group_name="groupName", security_group_egress=[ec2.CfnSecurityGroup.EgressProperty( ip_protocol="ipProtocol", # the properties below are optional cidr_ip="cidrIp", cidr_ipv6="cidrIpv6", description="description", destination_prefix_list_id="destinationPrefixListId", destination_security_group_id="destinationSecurityGroupId", from_port=123, to_port=123 )], security_group_ingress=[ec2.CfnSecurityGroup.IngressProperty( ip_protocol="ipProtocol", # the properties below are optional cidr_ip="cidrIp", cidr_ipv6="cidrIpv6", description="description", from_port=123, source_prefix_list_id="sourcePrefixListId", source_security_group_id="sourceSecurityGroupId", source_security_group_name="sourceSecurityGroupName", source_security_group_owner_id="sourceSecurityGroupOwnerId", to_port=123 )], tags=[CfnTag( key="key", value="value" )], vpc_id="vpcId" )
Attributes
- group_description
A description for the security group.
Constraints: Up to 255 characters in length
Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- group_name
The name of the security group.
Constraints: Up to 255 characters in length. Cannot start with
sg-
.Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- security_group_egress
The outbound rules associated with the security group.
There is a short interruption during which you cannot connect to the security group.
- security_group_ingress
The inbound rules associated with the security group.
There is a short interruption during which you cannot connect to the security group.
- tags
Any tags assigned to the security group.
- vpc_id
The ID of the VPC for the security group.
If you do not specify a VPC, the default is to use the default VPC for the Region. If there’s no specified VPC and no default VPC, security group creation fails.