Description
You can call this operation to modify the whitelist of a tenant.
Call description
Prerequisite
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/tenants/{tenantId}/modifyWhitelist
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the cluster to which the tenant belongs. |
| tenantId | Long | Yes | 1 | The ID of the tenant. |
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| whitelist | String | Yes | xxx.xxx.xxx.xxx | The access whitelist. * Valid values: IP addresses (for example, xxx.xxx.xxx.xxx) and CIDR blocks (for example, xxx.xxx.xxx.2/24). * Separate multiple IP addresses with commas (,), for example, xxx.xxx.xxx.xxx,xxx.xxx.xxx.2/24. * xxx.xxx.xxx.xxx indicates that no access is allowed from any IP address. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /api/v2/ob/clusters/1/tenants/2/modifyWhitelist
body:
{
"whitelist": "xxx.xxx.xxx.xxx"
}
Sample response
{
"duration": 233,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T16:02:24.643+08:00",
"traceId": "49556176bcfe439b"
}