AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes a security group rule.

Inheritance Hierarchy

System.Object
  Amazon.EC2.Model.SecurityGroupRule

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public class SecurityGroupRule

The SecurityGroupRule type exposes the following members

Constructors

NameDescription
Public Method SecurityGroupRule()

Properties

NameTypeDescription
Public Property CidrIpv4 System.String

Gets and sets the property CidrIpv4.

The IPv4 CIDR range.

Public Property CidrIpv6 System.String

Gets and sets the property CidrIpv6.

The IPv6 CIDR range.

Public Property Description System.String

Gets and sets the property Description.

The security group rule description.

Public Property FromPort System.Int32

Gets and sets the property FromPort.

The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Public Property GroupId System.String

Gets and sets the property GroupId.

The ID of the security group.

Public Property GroupOwnerId System.String

Gets and sets the property GroupOwnerId.

The ID of the Amazon Web Services account that owns the security group.

Public Property IpProtocol System.String

Gets and sets the property IpProtocol.

The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

Use -1 to specify all protocols.

Public Property IsEgress System.Boolean

Gets and sets the property IsEgress.

Indicates whether the security group rule is an outbound rule.

Public Property PrefixListId System.String

Gets and sets the property PrefixListId.

The ID of the prefix list.

Public Property ReferencedGroupInfo Amazon.EC2.Model.ReferencedSecurityGroup

Gets and sets the property ReferencedGroupInfo.

Describes the security group that is referenced in the rule.

Public Property SecurityGroupRuleId System.String

Gets and sets the property SecurityGroupRuleId.

The ID of the security group rule.

Public Property Tags System.Collections.Generic.List<Amazon.EC2.Model.Tag>

Gets and sets the property Tags.

The tags applied to the security group rule.

Public Property ToPort System.Int32

Gets and sets the property ToPort.

The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5