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.

If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).

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.

If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5