Overview
Use this API to check which cluster operations you can perform and whether their controls are visible in the console.
API details
Constraints
Authenticate with an AccessKey ID and an AccessKey Secret. For information about obtaining these credentials, see Manage AccessKeys. For common request headers and authentication details, see Using API.
Request path
GET /api/v2/instances/{instanceId}/operations
Request parameters
Path
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | OceanBase cluster ID. | obcluster-**** |
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | Request ID used for tracing. | d04eabba**** |
| operations | String | No | Comma-separated names of the operations to check. If omitted, the API checks the operations applicable to the instance type. | ModifyLogService |
Response parameters
Field |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Whether the request succeeded. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Object | Results of the operation checks. The fields returned depend on the instance type and the requested operations. | See response example. |
| cost | Number | Time taken to process the request. | 1.0 |
| server | String | Server address. | 10.0.0.10 |
| requestId | String | Request ID. | d04eabba**** |
| extra | Object | Additional information. | See additional information in the response example. |
data object fields
Field |
Type |
Description |
Example value |
|---|---|---|---|
| StandardCapacityScaleVisible | Object | Whether the control to change the cluster configuration is visible. | See StandardCapacityScaleVisible example. |
| StandardCapacityScale | Object | Whether you can change the cluster configuration. | See StandardCapacityScale example. |
| TemporaryCapacityScale | Object | Whether you can temporarily change the cluster configuration. | See TemporaryCapacityScale example. |
| DataDiskAutoScale | Object | Whether you can automatically scale the data disk. | See DataDiskAutoScale example. |
| IsolationOptimization | Object | Whether you can optimize isolation. | See IsolationOptimization example. |
| ReadOnlyReplicaVisible | Object | Whether the control to manage read-only replicas is visible. | See ReadOnlyReplicaVisible example. |
| ReadOnlyReplica | Object | Whether you can manage read-only replicas. | See ReadOnlyReplica example. |
| ModifyOCUScaleConfig | Object | Whether you can change OCU scaling settings. | See ModifyOCUScaleConfig example. |
| CreateStandByInstanceVisible | Object | Whether the control to create a standby instance is visible. | See CreateStandByInstanceVisible example. |
| CreateStandByInstance | Object | Whether you can create a standby instance. | See CreateStandByInstance example. |
| DeleteInstanceVisible | Object | Whether the control to delete the instance is visible. | See DeleteInstanceVisible example. |
| DeleteInstance | Object | Whether you can delete the instance. | See DeleteInstance example. |
| ChangeChargeType | Object | Whether you can change the billing method. | See ChangeChargeType example. |
| ModifyDeployMode | Object | Whether you can change the deployment mode. | See ModifyDeployMode example. |
| CreateTenants | Object | Whether you can create tenants. | See CreateTenants example. |
| ModifyMonitorFrequency | Object | Whether you can change the monitoring collection interval. | See ModifyMonitorFrequency example. |
| ModifyDiskType | Object | Whether you can change the disk type. | See ModifyDiskType example. |
| CreateTenantAddress | Object | Whether you can create a tenant address. | See CreateTenantAddress example. |
| ModifyTenantPrimaryZoneVisible | Object | Whether the control to change the tenant's primary zone is visible. | See ModifyTenantPrimaryZoneVisible example. |
| ModifyTenantPrimaryZone | Object | Whether you can change the tenant's primary zone. | See ModifyTenantPrimaryZone example. |
| ModifyTenantUnitResourceVisible | Object | Whether the control to change tenant unit specifications is visible. | See ModifyTenantUnitResourceVisible example. |
| ModifyTenantUnitResource | Object | Whether you can change tenant unit specifications. | See ModifyTenantUnitResource example. |
| CreateTenantUserVisible | Object | Whether the control to create a tenant user is visible. | See CreateTenantUserVisible example. |
| CreateTenantUser | Object | Whether you can create a tenant user. | See CreateTenantUser example. |
| CreateDatabaseVisible | Object | Whether the control to create a database is visible. | See CreateDatabaseVisible example. |
| CreateDatabase | Object | Whether you can create a database. | See CreateDatabase example. |
| ModifyTenantReadOnlyReplicaVisible | Object | Whether the control to modify tenant read-only replicas is visible. | See ModifyTenantReadOnlyReplicaVisible example. |
| ModifyTenantReadOnlyReplica | Object | Whether you can modify tenant read-only replicas. | See ModifyTenantReadOnlyReplica example. |
| ModifyTenantDefaultAiFunctionVisible | Object | Whether the control to change the tenant's default AI functionality is visible. | See ModifyTenantDefaultAiFunctionVisible example. |
| ModifyTenantDefaultAiFunction | Object | Whether you can change the tenant's default AI functionality. | See ModifyTenantDefaultAiFunction example. |
| ModifyStandbyTenantSyncStrategy | Object | Whether you can change the standby tenant's synchronization strategy. | See ModifyStandbyTenantSyncStrategy example. |
| ModifyLogServiceVisible | Object | Whether the control to change the log service configuration is visible. | See ModifyLogServiceVisible example. |
| ModifyLogService | Object | Whether you can change the log service configuration. | See ModifyLogService example. |
| ModifyStorageQosVisible | Object | Whether the control to modify storage QoS settings is visible. | See ModifyStorageQosVisible example. |
| ModifyStorageQos | Object | Whether you can modify storage QoS settings. | See ModifyStorageQos example. |
To check whether you can modify a tenant IP allowlist or see the corresponding control, call DescribeTenantOperation.
data.ModifyLogService object fields
These fields also apply to other operation and visibility checks that return the same structure. In this example, the instance is not running, so its log service configuration cannot be changed.
Field |
Type |
Description |
Example value |
|---|---|---|---|
| Permitted | Boolean | Whether the operation is allowed. For a visibility check, whether the corresponding control is visible. | false |
| Reason | String | Reason code when the operation is unavailable or the control is hidden. | INSTANCE_NOT_ONLINE |
| Message | String | Message describing the result. | The instance is not running. |
Examples
Request example
Check whether the log service configuration can be changed for the specified cluster.
curl --digest -u '<AccessKey ID>:<AccessKey Secret>' \
--get 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/operations' \
--data-urlencode 'requestId={requestId}' \
--data-urlencode 'operations=ModifyLogService'
Response example
This partial response shows that the log service configuration control is visible. The instance is not running, so the configuration cannot be changed. The query itself succeeded (the value of success is true). In this example, extra is empty.
{
"success": true,
"data": {
"ModifyLogServiceVisible": {
"Permitted": true
},
"ModifyLogService": {
"Permitted": false,
"Reason": "INSTANCE_NOT_ONLINE",
"Message": "The instance is not running."
}
},
"requestId": "d04eabba****",
"extra": {}
}
The following JSON excerpts show operation names and selected fields within data. The fields returned depend on the instance type and the operations requested.
Specification and capacity operations
{
"StandardCapacityScaleVisible": { "Permitted": true },
"StandardCapacityScale": { "Permitted": true },
"TemporaryCapacityScale": { "Permitted": true },
"DataDiskAutoScale": { "Permitted": true },
"IsolationOptimization": { "Permitted": true },
"ModifyOCUScaleConfig": { "Permitted": true },
"ModifyDiskType": { "Permitted": true }
}
Cluster management operations
Each check returns an object. The Boolean field Permitted gives the result. The object can also contain a reason code (Reason) and a message (Message).
In this example, CreateStandByInstanceVisible.Permitted is true, so the control for creating a standby instance is visible. CreateStandByInstance.Permitted is also true, so the standby instance can be created.
{
"CreateStandByInstanceVisible": { "Permitted": true },
"CreateStandByInstance": { "Permitted": true },
"DeleteInstanceVisible": { "Permitted": true },
"DeleteInstance": { "Permitted": false },
"ChangeChargeType": { "Permitted": true },
"ModifyDeployMode": { "Permitted": true },
"CreateTenants": { "Permitted": true },
"ModifyMonitorFrequency": { "Permitted": true },
"ModifyStandbyTenantSyncStrategy": { "Permitted": false }
}
Read-only replica operations
{
"ReadOnlyReplicaVisible": {
"Permitted": true
},
"ReadOnlyReplica": {
"Permitted": true
}
}
Tenant management operations
{
"ModifyTenantPrimaryZoneVisible": { "Permitted": true },
"ModifyTenantPrimaryZone": { "Permitted": true },
"ModifyTenantUnitResourceVisible": { "Permitted": true },
"ModifyTenantUnitResource": { "Permitted": true },
"CreateTenantUserVisible": { "Permitted": true },
"CreateTenantUser": { "Permitted": true },
"CreateDatabaseVisible": { "Permitted": true },
"CreateDatabase": { "Permitted": true },
"ModifyTenantReadOnlyReplica": { "Permitted": true },
"ModifyTenantDefaultAiFunctionVisible": { "Permitted": true },
"ModifyTenantDefaultAiFunction": { "Permitted": true }
}
Storage QoS operations
{
"ModifyStorageQosVisible": {
"Permitted": true
},
"ModifyStorageQos": {
"Permitted": false,
"Reason": "INSTANCE_NOT_ONLINE",
"Message": "The instance is not running."
}
}
Visibility of the tenant read-only replica control
{
"ModifyTenantReadOnlyReplicaVisible": {
"Permitted": true
}
}
Tenant address operations
{
"CreateTenantAddress": {
"Permitted": true
}
}