Overview
You can call this API to modify the IP address list in the IP allowlist of an instance.
API details
Constraints
The caller must have an AccessKey for accessing APIs of multiple clouds. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT /api/v2/instances/{instanceId}/securityIpGroups
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the instance. | obxxx |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| securityIpGroupName | String | Yes | The name of the IP allowlist. The name must be 2 to 32 characters in length, start with a lowercase letter, and end with a lowercase letter or a digit. It can contain only lowercase letters, digits, and underscores. | all |
| SecurityIps | String | Yes | The IP allowlist. It is a JSON array. Each object in the array is an IP address or an IP segment. You can specify up to 40 IP addresses or segments. | ["192.168.0.0/20", "192.169.1.1"] |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | object | The returned result of the request | See the table below |
| instanceId | String | The ID of the instance. | obxxx |
| securityIpGroupName | String | The name of the IP allowlist. | all |
| securityIps | String | The IP allowlist. | ["127.0.0.1"] |
| requestId | String | The ID of the request. | 5955b710-cb29-4056-81b4-0832b048e0c4 |
| success | Boolean | Indicates whether the request was successful. | true |
Examples
Request example
curl --digest -u 'ak:sk' \
-- request PUT \
https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/securityIpGroups \
--data '{
"securityIpGroupName":"all",
"securityIps": "[\"127.0.0.1\"]"
}'
Response example
JSON format
{
"data":{
"instanceId":"obxxx",
"securityIpGroupName":"all",
"securityIps":"[\"127.0.0.1\"]"
},
"requestId":"5955b710-cb29-4056-81b4-0832b048e0c4",
"success":true
}