機能の概要
リージョンIDに基づいて、ホストのリージョン情報を照会します。
呼び出しの説明
インターフェース制約
呼び出し元はHOST_VIEWER権限を持っている必要があります。
リクエストパス
GET /api/v2/compute/regions/{id}
リクエストパラメータ
path:
パラメータ |
型 |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| id | Integer | はい | 2 | ホストリージョンID。 |
戻り値
基本データ構造
パラメータ |
型 |
説明 |
|---|---|---|
| data | Object | リクエストされたデータ。 |
| ├─ contents | Array | Regionの配列。詳細はRegionデータ構造を参照してください。 |
| ├─ page | Object | ページネーション情報。 |
| ├─ totalElements | Integer | 総レコード数。 |
| ├─ totalPages | Integer | 総ページ数。 |
| ├─ number | Integer | 現在のページ番号。 |
| ├─ size | Integer | 現在のページサイズ。 |
| successful | Boolean | リクエストが成功したかどうか。 |
| timestamp | Datetime | サーバーがリクエストを完了したタイムスタンプ。 |
| duration | Integer | サーバーがリクエストを処理した時間(ミリ秒)。 |
| status | Integer | HTTPステータスコード。 |
| traceId | String | リクエストのTrace ID。問題のトラブルシューティングに使用されます。 |
| server | String | リクエストに応答したアプリケーションサービスのアドレス。 |
Regionデータ構造
パラメータ |
型 |
説明 |
|---|---|---|
| id | Integer | リージョンID。 |
| name | String | リージョン名。 |
| description | String | リージョンの説明情報。 |
| createTime | String | リージョン情報の作成時間。 |
| updateTime | String | リージョン情報の更新時間。 |
| hostCount | Integer | リージョン内のホスト数。 |
| idcs | Array | リージョン内のデータセンターリスト。詳細はIdcEntityデータ構造を参照してください。 |
IdcEntityデータ構造
パラメータ |
型 |
説明 |
|---|---|---|
| id | Integer | データセンターID。 |
| name | String | データセンター名。 |
| description | String | データセンターの説明情報。 |
| createTime | String | データセンター情報の作成時間。 |
| updateTime | String | データセンター情報の更新時間。 |
| region | - | リージョン情報。 |
例
リクエスト例
GET /api/v2/compute/regions/2
レスポンス例
{
"data": {
"contents": [
{
"createTime": "2024-12-31T17:53:46+08:00",
"description": null,
"hostCount": 2,
"id": 1,
"idcs": [
{
"createTime": "2024-12-31T18:01:44+08:00",
"id": 1,
"name": "changsha",
"region": {
"createTime": "2024-12-31T17:53:46+08:00",
"id": 1,
"name": "OCP_META_REGION",
"updateTime": "2024-12-31T17:53:46+08:00"
},
"updateTime": "2024-12-31T18:01:44+08:00"
},
{
"createTime": "2025-04-25T10:56:27+08:00",
"id": 1000001,
"name": "beijing",
"region": {
"createTime": "2024-12-31T17:53:46+08:00",
"id": 1,
"name": "OCP_META_REGION",
"updateTime": "2024-12-31T17:53:46+08:00"
},
"updateTime": "2025-04-25T10:56:27+08:00"
}
],
"name": "OCP_META_REGION",
"updateTime": "2024-12-31T17:53:46+08:00"
}
],
"page": {
"number": 1,
"size": 5000,
"totalElements": 1,
"totalPages": 1
}
},
"duration": 30333,
"server": "b3b6d90167",
"status": 200,
"successful": true,
"timestamp": "2025-04-25T11:08:21.541+08:00",
"traceId": "68a416f4827bf696"
}