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.

Container for the parameters to the RevokeSecurityGroupIngress operation. Removes the specified inbound (ingress) rules from a security group.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and source (CIDR range, security group, or prefix list). For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not need to specify the description to revoke the rule.

For a default VPC, if the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

For a non-default VPC, if the values you specify do not match the existing rule's values, an InvalidPermission.NotFound client error is returned, and no rules are revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.EC2.AmazonEC2Request
      Amazon.EC2.Model.RevokeSecurityGroupIngressRequest

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

Syntax

C#
public class RevokeSecurityGroupIngressRequest : AmazonEC2Request
         IAmazonWebServiceRequest

The RevokeSecurityGroupIngressRequest type exposes the following members

Constructors

NameDescription
Public Method RevokeSecurityGroupIngressRequest()

Empty constructor used to set properties independently even when a simple constructor is available

Public Method RevokeSecurityGroupIngressRequest(string, List<IpPermission>)

Instantiates RevokeSecurityGroupIngressRequest with the parameterized properties

Properties

NameTypeDescription
Public Property GroupId System.String

Gets and sets the property GroupId.

The ID of the security group.

Public Property GroupName System.String

Gets and sets the property GroupName.

[Default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

Public Property IpPermissions System.Collections.Generic.List<Amazon.EC2.Model.IpPermission>

Gets and sets the property IpPermissions.

The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

Public Property SecurityGroupRuleIds System.Collections.Generic.List<System.String>

Gets and sets the property SecurityGroupRuleIds.

The IDs of the security group rules.

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