機能の概要
指定したテナントのレプリカを変更するために使用するインターフェースです。
呼び出しの説明
インターフェース制約
呼び出し元はOCPアプリケーションサービスの認証を通過している必要があります。
リクエストパス
POST /api/v2/ob/clusters/{id}/tenants/{tenantId}/modifyReplica
リクエストパラメータ
path:
パラメータ |
タイプ |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| id | Long | はい | 20 | 対象テナントが属するクラスタのOCP側のクラスタID。 |
| tenantId | Long | はい | 3 | 対象テナントのOCP側のテナントID。 |
body:
パラメータ |
タイプ |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| zoneName | String | はい | foo | テナント名。クラスタ内で一意である。 |
| replicaType | String | いいえ | FULL | レプリカタイプ。 |
| resourcePool | Object | いいえ | -- | リソースプール情報。 |
| ├─unitSpecName | Object | いいえ | S1 | 「ユニット仕様管理」ページで仕様リストを確認できます。 |
| ├─unitCount | Integer | いいえ | 1 | ユニット数。 |
戻り値
基本データ構造
パラメータ |
タイプ |
説明 |
|---|---|---|
| data | Object | 作成されたテナント情報、非同期DAGタスク情報。詳細については、タスク情報を参照してください。 |
| successful | Boolean | リクエストが成功したかどうか。 |
| timestamp | Datetime | サーバーがリクエストを完了したタイムスタンプ。 |
| duration | Integer | サーバーがリクエストを処理した時間(ミリ秒)。 |
| status | Integer | HTTPステータスコード。 |
| traceId | String | リクエストのTrace ID。問題のトラブルシューティングに使用されます。 |
| server | String | リクエストに応答したアプリケーションサービスのアドレス。 |
例
リクエスト例
パス:
POST /api/v2/ob/clusters/20/tenants/3/modifyReplica
ボディ:
[
{
"zoneName": "zone1",
"replicaType": "FULL",
"resourcePool": {
"unitSpecName": "S1",
"unitCount": 1
}
}
]
レスポンス例
{
"data": {
"cluster": {
"id": 20,
"name": "ob_upgrade",
"obClusterId": 20
},
"context": "Context(parallelIdx=-1, stringMap={tenant_id=3, cluster_id=20, zone_name=zone2}, listMap={})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 94494,
"name": "Modify tenant replica",
"startTime": "2021-03-01T15:12:07.419+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Wait alter locality",
"downstreams": [
112165
],
"id": 112163,
"name": "Wait alter locality",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
112164
]
},
{
"description": "Prepare alter tenant",
"downstreams": [
112163
],
"id": 112164,
"name": "Prepare alter tenant",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Sync tenant information",
"downstreams": [
112166
],
"id": 112165,
"name": "Sync tenant information",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
112163
]
},
{
"description": "Update tenant status",
"downstreams": [
],
"id": 112166,
"name": "Update tenant status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
112165
]
}
],
"tenant": {
"id": 3,
"name": "tenant1"
}
},
"duration": 406,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-01T15:12:07.449+08:00",
"traceId": "71f24180979c487b"
}