Modifies the IP addresses that are allowed to access an AnalyticDB for PostgreSQL instance.

Description

To ensure the security and stability of AnalyticDB for PostgreSQL instances, the system denies all external IP addresses to access AnalyticDB for PostgreSQL instances by default. Before you can use an AnalyticDB for PostgreSQL instance, you must add the IP address or CIDR block of your client to the IP address whitelist of the instance.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifySecurityIps

The operation that you want to perform. Set the value to ModifySecurityIps.

ResourceGroupId String No rg-bp67acfmxazb4p****

The ID of the resource group to which the instance belongs. For more information about how to obtain the ID of a resource group, see View basic information of a resource group.

DBInstanceId String Yes gp-bp12ga6v69h86****

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the instance IDs of all AnalyticDB for PostgreSQL instances in a specific region.
SecurityIPList String Yes 127.0.0.1

The IP addresses listed in the whitelist. You can add up to 1,000 IP addresses to the whitelist. Separate multiple IP addresses with commas (,). The IP addresses must use one of the following formats:

  • 0.0.0.0/0
  • 10.23.12.24. This is a standard IP address.
  • 10.23.12.24/24. This is a CIDR block. The value /24 indicates that the prefix of the CIDR block is 24-bit long. You can replace 24 with a value in the range of 1 to 32.
DBInstanceIPArrayName String No Default

The name of the whitelist. If you do not enter a name, IP addresses are added to the default whitelist.

Note You can create up to 50 whitelists for an instance.
DBInstanceIPArrayAttribute String No hidden

The attribute of the IP address whitelist. By default, this parameter is empty. A whitelist with the hidden attribute does not appear in the console.

Response parameters

Parameter Type Example Description
RequestId String 871C698F-B43D-4D1D-ACD6-DF56B0F89978

The ID of the request.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=ModifySecurityIps
&DBInstanceId=gp-bp12ga6v69h86****
&SecurityIPList=127.0.0.1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifySecurityIpsResponse>
         <RequestId>871C698F-B43D-4D1D-ACD6-DF56B0F89978</RequestId>
</ModifySecurityIpsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "871C698F-B43D-4D1D-ACD6-DF56B0F89978"
}

Error codes

For a list of error codes, visit the API Error Center.