Class CfnSecurityGroupProps
Properties for defining a CfnSecurityGroup
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnSecurityGroupProps : Object, ICfnSecurityGroupProps
Syntax (vb)
Public Class CfnSecurityGroupProps
Inherits Object
Implements ICfnSecurityGroupProps
Remarks
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.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
Constructors
CfnSecurityGroupProps() |
Properties
GroupDescription | A description for the security group. |
GroupName | The name of the security group. |
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. |
Constructors
CfnSecurityGroupProps()
public CfnSecurityGroupProps()
Properties
GroupDescription
A description for the security group.
public string GroupDescription { get; set; }
Property Value
System.String
Remarks
Constraints: Up to 255 characters in length
Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
GroupName
The name of the security group.
public string GroupName { get; set; }
Property Value
System.String
Remarks
Constraints: Up to 255 characters in length. Cannot start with sg-
.
Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
SecurityGroupEgress
The outbound rules associated with the security group.
public object SecurityGroupEgress { get; set; }
Property Value
System.Object
Remarks
There is a short interruption during which you cannot connect to the security group.
SecurityGroupIngress
The inbound rules associated with the security group.
public object SecurityGroupIngress { get; set; }
Property Value
System.Object
Remarks
There is a short interruption during which you cannot connect to the security group.
Tags
Any tags assigned to the security group.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
VpcId
The ID of the VPC for the security group.
public string VpcId { get; set; }
Property Value
System.String