Show / Hide Table of Contents

Interface ICfnSecurityGroupProps

Properties for defining a CfnSecurityGroup.

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnSecurityGroupProps
Syntax (vb)
Public Interface ICfnSecurityGroupProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var cfnSecurityGroupProps = new CfnSecurityGroupProps {
                 GroupDescription = "groupDescription",

                 // the properties below are optional
                 GroupName = "groupName",
                 SecurityGroupEgress = new [] { new EgressProperty {
                     IpProtocol = "ipProtocol",

                     // the properties below are optional
                     CidrIp = "cidrIp",
                     CidrIpv6 = "cidrIpv6",
                     Description = "description",
                     DestinationPrefixListId = "destinationPrefixListId",
                     DestinationSecurityGroupId = "destinationSecurityGroupId",
                     FromPort = 123,
                     ToPort = 123
                 } },
                 SecurityGroupIngress = new [] { new IngressProperty {
                     IpProtocol = "ipProtocol",

                     // the properties below are optional
                     CidrIp = "cidrIp",
                     CidrIpv6 = "cidrIpv6",
                     Description = "description",
                     FromPort = 123,
                     SourcePrefixListId = "sourcePrefixListId",
                     SourceSecurityGroupId = "sourceSecurityGroupId",
                     SourceSecurityGroupName = "sourceSecurityGroupName",
                     SourceSecurityGroupOwnerId = "sourceSecurityGroupOwnerId",
                     ToPort = 123
                 } },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 VpcId = "vpcId"
             };

Synopsis

Properties

GroupDescription

A description for the security group.

GroupName

The name of the security group. Names are case-insensitive and must be unique within the VPC.

SecurityGroupEgress

The outbound rules associated with the security group.

SecurityGroupIngress

The inbound rules associated with the security group.

Tags

Any tags assigned to the security group.

VpcId

The ID of the VPC for the security group.

Properties

GroupDescription

A description for the security group.

string GroupDescription { get; }
Property Value

string

Remarks

Constraints: Up to 255 characters in length

Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html#cfn-ec2-securitygroup-groupdescription

GroupName

The name of the security group. Names are case-insensitive and must be unique within the VPC.

string? GroupName { get; }
Property Value

string

Remarks

Constraints: Up to 255 characters in length. Can't start with sg- .

Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html#cfn-ec2-securitygroup-groupname

SecurityGroupEgress

The outbound rules associated with the security group.

object? SecurityGroupEgress { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html#cfn-ec2-securitygroup-securitygroupegress

SecurityGroupIngress

The inbound rules associated with the security group.

object? SecurityGroupIngress { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html#cfn-ec2-securitygroup-securitygroupingress

Tags

Any tags assigned to the security group.

ICfnTag[]? Tags { get; }
Property Value

ICfnTag[]

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-securitygroup.html#cfn-ec2-securitygroup-tags

VpcId

The ID of the VPC for the security group.

string? VpcId { get; }
Property Value

string

Remarks

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#cfn-ec2-securitygroup-vpcid

Back to top Generated by DocFX