Overview
You can call this API to create a security IP group.
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
POST api/v2/instances/{instanceId}/securityIpGroups
Request parameters
Path
| Parameter | Type | Required | Description |
|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| securityIpGroupName | String | Yes | The name of the security IP group. |
| securityIps | String | Yes | The list of security IPs in the JSON array string format. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| instanceId | String | The ID of the OceanBase cluster. |
| securityIpGroupName | String | The name of the security IP group. |
| securityIps | String | The list of security IPs in the JSON array string format. |
| requestId | String | The ID of the request. |
| success | Boolean | Indicates whether the request was successful. |
Examples
Request example
curl --digest -u 'ak:sk' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/securityIpGroups' \
--data '{"securityIpGroupName":"test","securityIps":"[\"xx.xxx.xx.xxx\"]"}'
Response example
JSON format
{
"data": {
"instanceId": "ob6nmigxjr4yrk",
"securityIpGroupName": "test",
"securityIps": "[\"xx.xxx.xx.xxx\"]"
},
"requestId": "xxxxxx-e51a-4c32-a95e-b5ae24e98c03",
"success": true
}
Differences from public cloud
The securityIps parameter is a JSON array string. Note that you must escape the characters.