Overview
You can call this API to modify the allowlists of a tenant.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT /api/v2/instances/{instanceId}/tenants/{tenantId}/securityIpGroups
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t4louaeei**** |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| securityIps | String | Yes | The list of IP addresses and CIDR blocks in the allowlist. It is a JSON array. Each object in the array is an IP address or a CIDR block. You can specify at most 40 IP addresses or CIDR blocks. | ["192.***.*.*"] |
| securityIpGroupName | String | Yes | The name of the allowlist. It must be 2 to 32 characters in length, start with a lowercase letter, and end with a lowercase letter or digit. It can contain only lowercase letters, digits, and underscores (_). | paytest |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The information about the allowlists of the tenant. | |
| instanceId | String | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | The ID of the tenant. | t4louaeei**** |
| aecurityIps | String | The items in the allowlist. The value is a string of objects separated with commas (,). Each object is an IP address or a CIDR block. | ["192.***.*.*"] |
| securityIpGroupName | String | The name of the allowlist. | paytest |
Examples
Request example
curl -v --location \
--digest -u 'xxx:xxx' \
--request PUT \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/securityIpGroups
-H 'X-Ob-Project-Id: <Project ID>'
--data \ '{"securityIps":"xxx", "securityIpGroupName": "xxx"}'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format
{
"data": {
"instanceId": "ob****cs97mx9c",
"securityIpGroupName": "zhi****111",
"securityIps": "[\"127.x.x.x\", \"x.x.x.x\"]",
"tenantId": "t****2u5q6l4w"
},
"requestId": "b****1010",
"success": true
}