Overview
You can call this API to create an IP allowlist group for 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
DELETE /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 group. | all |
| securityIps | String | Yes | The IP addresses or CIDR blocks in the IP allowlist group. It is a JSON array. Each object in the array is an IP address or a CIDR block.
|
["192.168.0.0/20", "192.169.1.1"] |
Response parameters
| Parameter | Type | Description | Example value | |
|---|---|---|---|---|
| data | object | The returned result. | ||
| instanceId | String | The ID of the instance. | obxxx | |
| securityIpGroupName | String | The name of the IP allowlist group. | 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 | 1 |
Examples
Request example
curl --digest -u 'ak:sk' \
--request POST \
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
}