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.

Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC security groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the internet. Required parameters for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).

You can't authorize ingress from an EC2 security group in one Amazon Web Services Region to an Amazon RDS DB instance in another. You can't authorize ingress from a VPC security group in one VPC to an Amazon RDS DB instance in another.

For an overview of CIDR ranges, go to the Wikipedia Tutorial.

EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How to Prepare, and Moving a DB instance not in a VPC into a VPC in the Amazon RDS User Guide.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to AuthorizeDBSecurityGroupIngressAsync.

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

Syntax

C#
public virtual AuthorizeDBSecurityGroupIngressResponse AuthorizeDBSecurityGroupIngress(
         AuthorizeDBSecurityGroupIngressRequest request
)

Parameters

request
Type: Amazon.RDS.Model.AuthorizeDBSecurityGroupIngressRequest

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

Return Value


The response from the AuthorizeDBSecurityGroupIngress service method, as returned by RDS.

Exceptions

ExceptionCondition
AuthorizationAlreadyExistsException The specified CIDR IP range or Amazon EC2 security group is already authorized for the specified DB security group.
AuthorizationQuotaExceededException The DB security group authorization quota has been reached.
DBSecurityGroupNotFoundException DBSecurityGroupName doesn't refer to an existing DB security group.
InvalidDBSecurityGroupStateException The state of the DB security group doesn't allow deletion.

Version Information

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

See Also