AWS SDK Version 2 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.

.NET Framework 3.5
Describes a security group rule.

Inheritance Hierarchy


Namespace: Amazon.EC2.Model
Assembly: AWSSDK.dll
Version: (assembly version)


public class IpPermission : Object

The IpPermission type exposes the following members


Public Method IpPermission()


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 type number. A value of -1 indicates all ICMP types.

Public Property IpProtocol System.String Gets and sets the property IpProtocol.

The protocol.

When you call DescribeSecurityGroups, the protocol value returned is the number. Exception: For TCP, UDP, and ICMP, the value returned is the name (for example, tcp, udp, or icmp). For a list of protocol numbers, see Protocol Numbers. (VPC only) When you call AuthorizeSecurityGroupIngress, you can use -1 to specify all.

Public Property IpRanges System.Collections.Generic.List<System.String> Gets and sets the property IpRanges.

One or more IP ranges.

Public Property PrefixListIds System.Collections.Generic.List<Amazon.EC2.Model.PrefixListId> Gets and sets the property PrefixListIds.

(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

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 code. A value of -1 indicates all ICMP codes for the specified ICMP type.

Public Property UserIdGroupPairs System.Collections.Generic.List<Amazon.EC2.Model.UserIdGroupPair> Gets and sets the property UserIdGroupPairs.

One or more security group and AWS account ID pairs.

Version Information

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

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8