You can call this operation to modify the IP address whitelist of an ApsaraDB for MongoDB instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ModifySecurityIps |
The operation that you want to perform. Set the value to ModifySecurityIps. |
| DBInstanceId | String | Yes | dds-bpxxxxxxxx |
The ID of an instance. |
| SecurityIps | String | Yes | 127.0.0.1/24,127.0.0.1 |
The IP addresses in an IP address whitelist. Separate multiple IP addresses with commas (,). You can add a maximum of 1,000 different IP addresses to a whitelist. You can add IP addresses in one of the following two formats:
|
| RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the region ID of the instance. |
| ModifyMode | String | No | Append |
The method of modification. Valid values:
The default value is Cover. |
| SecurityIpGroupName | String | No | allowserver |
The name of the IP address whitelist to be modified. The default value is default. |
| SecurityIpGroupAttribute | String | No | test |
The attributes of an IP address whitelist. It can contain a maximum of 120 characters in length and can contain uppercase letters, lowercase letters, and digits. This parameter is empty by default. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 61B05CCF-EBAB-4BF3-BA67-D77256A721E2 |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/? Action=ModifySecurityIps
&SecurityIps=127.0.0.1/24,127.0.0.1
&DBInstanceId=dds-bp****
&<Common request parameters>Sample success responses
XML format
<ModifySecurityIpsResponse>
<RequestId>61B05CCF-EBAB-4BF3-BA67-D77256A721E2</RequestId>
</ModifySecurityIpsResponse>JSON format
{
"RequestId": "61B05CCF-EBAB-4BF3-BA67-D77256A721E2"
}Error codes
For a list of error codes, visit the API Error Center.