import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { AuthorizeDBSecurityGroupIngressMessage, AuthorizeDBSecurityGroupIngressResult } from "../models/models_0"; import type { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link AuthorizeDBSecurityGroupIngressCommand}. */ export interface AuthorizeDBSecurityGroupIngressCommandInput extends AuthorizeDBSecurityGroupIngressMessage { } /** * @public * * The output of {@link AuthorizeDBSecurityGroupIngressCommand}. */ export interface AuthorizeDBSecurityGroupIngressCommandOutput extends AuthorizeDBSecurityGroupIngressResult, __MetadataBearer { } declare const AuthorizeDBSecurityGroupIngressCommand_base: { new (input: AuthorizeDBSecurityGroupIngressCommandInput): import("@smithy/core/client").CommandImpl; new (input: AuthorizeDBSecurityGroupIngressCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RDSClient, AuthorizeDBSecurityGroupIngressCommand } from "@aws-sdk/client-rds"; // ES Modules import * // const { RDSClient, AuthorizeDBSecurityGroupIngressCommand } = require("@aws-sdk/client-rds"); // CommonJS import * // import type { RDSClientConfig } from "@aws-sdk/client-rds"; * const config = {}; // type is RDSClientConfig * const client = new RDSClient(config); * const input = { // AuthorizeDBSecurityGroupIngressMessage * DBSecurityGroupName: "STRING_VALUE", // required * CIDRIP: "STRING_VALUE", * EC2SecurityGroupName: "STRING_VALUE", * EC2SecurityGroupId: "STRING_VALUE", * EC2SecurityGroupOwnerId: "STRING_VALUE", * }; * const command = new AuthorizeDBSecurityGroupIngressCommand(input); * const response = await client.send(command); * // { // AuthorizeDBSecurityGroupIngressResult * // DBSecurityGroup: { // DBSecurityGroup * // OwnerId: "STRING_VALUE", * // DBSecurityGroupName: "STRING_VALUE", * // DBSecurityGroupDescription: "STRING_VALUE", * // VpcId: "STRING_VALUE", * // EC2SecurityGroups: [ // EC2SecurityGroupList * // { // EC2SecurityGroup * // Status: "STRING_VALUE", * // EC2SecurityGroupName: "STRING_VALUE", * // EC2SecurityGroupId: "STRING_VALUE", * // EC2SecurityGroupOwnerId: "STRING_VALUE", * // }, * // ], * // IPRanges: [ // IPRangeList * // { // IPRange * // Status: "STRING_VALUE", * // CIDRIP: "STRING_VALUE", * // }, * // ], * // DBSecurityGroupArn: "STRING_VALUE", * // }, * // }; * * ``` * * @param AuthorizeDBSecurityGroupIngressCommandInput - {@link AuthorizeDBSecurityGroupIngressCommandInput} * @returns {@link AuthorizeDBSecurityGroupIngressCommandOutput} * @see {@link AuthorizeDBSecurityGroupIngressCommandInput} for command's `input` shape. * @see {@link AuthorizeDBSecurityGroupIngressCommandOutput} for command's `response` shape. * @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape. * * @throws {@link AuthorizationAlreadyExistsFault} (client fault) *

The specified CIDR IP range or Amazon EC2 security group is already authorized for the specified DB security group.

* * @throws {@link AuthorizationQuotaExceededFault} (client fault) *

The DB security group authorization quota has been reached.

* * @throws {@link DBSecurityGroupNotFoundFault} (client fault) *

DBSecurityGroupName doesn't refer to an existing DB security group.

* * @throws {@link InvalidDBSecurityGroupStateFault} (client fault) *

The state of the DB security group doesn't allow deletion.

* * @throws {@link RDSServiceException} *

Base exception class for all service exceptions from RDS service.

* * * @example To authorize DB security group integress * ```javascript * // This example authorizes access to the specified security group by the specified CIDR block. * const input = { * CIDRIP: "203.0.113.5/32", * DBSecurityGroupName: "mydbsecuritygroup" * }; * const command = new AuthorizeDBSecurityGroupIngressCommand(input); * const response = await client.send(command); * /* response is * { * DBSecurityGroup: { /* empty *\/ } * } * *\/ * ``` * * @public */ export declare class AuthorizeDBSecurityGroupIngressCommand extends AuthorizeDBSecurityGroupIngressCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: AuthorizeDBSecurityGroupIngressMessage; output: AuthorizeDBSecurityGroupIngressResult; }; sdk: { input: AuthorizeDBSecurityGroupIngressCommandInput; output: AuthorizeDBSecurityGroupIngressCommandOutput; }; }; }