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. |
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
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.
virtual string GroupName { get; }
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.
virtual object SecurityGroupEgress { get; }
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.
virtual object SecurityGroupIngress { get; }
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.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]
Remarks
VpcId
The ID of the VPC for the security group.
virtual string VpcId { get; }
Property Value
System.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.