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.

Adds the specified outbound (egress) rules to a security group.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 address ranges, the IP address ranges specified by a prefix list, or the instances that are associated with a source security group. For more information, see Security group rules.

You must specify exactly one of the following destinations: an IPv4 or IPv6 address range, a prefix list, or a security group. You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP type and code.

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

For examples of rules that you can add to security groups for specific access scenarios, see Security group rules for different use cases in the Amazon EC2 User Guide.

For information about security group quotas, see Amazon VPC quotas in the Amazon VPC User Guide.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginAuthorizeSecurityGroupEgress and EndAuthorizeSecurityGroupEgress.

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

Syntax

C#
public virtual Task<AuthorizeSecurityGroupEgressResponse> AuthorizeSecurityGroupEgressAsync(
         AuthorizeSecurityGroupEgressRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.EC2.Model.AuthorizeSecurityGroupEgressRequest

Container for the necessary parameters to execute the AuthorizeSecurityGroupEgress service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the AuthorizeSecurityGroupEgress service method, as returned by EC2.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also