ストレージ・ボリュームは、ストレージ・プールで作成される特定サイズのストレージです。 オーケストレーションで、またはインスタンスを起動した後に、それらをインスタンスにアタッチできます。
このAPIを使用すると、ストレージ・ボリュームを追加できます。
メソッド
POST
注意:
自分のテナント内のプライベート・ボリュームのみを追加できます。RESTリソース
/storage/volume/
URI
https://api_endpoint/storage/volume/
リクエスト本文のパラメータ
| パラメータ | 説明 |
|---|---|
| name | このストレージ・ボリュームの名前。
オブジェクト名には、英数字、ハイフン、およびピリオドのみを使用できます。 オブジェクト名は大文字と小文字が区別されます。 |
| size | バイトの数またはバイトの倍数で測定されたこのストレージ・ボリュームのサイズ。 指定できる範囲は1 GBから2 TBまで、増分の単位は1 GBずつです。
次の短縮形のいずれかを測定単位として使用します。
たとえば、サイズが10GBのボリュームを作成するには、10G、10240M、10485760Kなどというように指定できます。 |
| properties | このストレージ・ボリュームに関連付けられているストレージ・プロパティのリスト。
次のストレージ・プロパティがサポートされます。
外部ストレージ・アプライアンス上のストレージ・ボリュームの設定については、「Oracle Compute Cloud Serviceの使用」の「ストレージ・ボリュームの管理」を参照してください。 |
| description | (オプション)ストレージ・ボリュームの説明 |
| source_storagevolume_name | (オプション)既存のストレージ・ボリュームの名前で、このボリュームが作成されると、ここからデータがコピーされます |
| imagelist | (オプション)作成された時に、このストレージ・ボリュームのソースとして使用するリストの名前。 このオプションは、特定のマシン・イメージを参照するために、imagelist_entryと一組で使用する必要があります。 |
| imagelist_entry | (オプション)抽出するための固有のイメージ・リストのエントリ・バージョン |
| tags | (オプション)ストレージ・ボリュームをタグ付けする使いやすい文字列のリスト。 次の構文で、タグを指定する必要があります: "tags": ["tag1", "tag2"] |
| quota | (オプション)このボリュームが作成される割当て制限。 割当て制限が指定されない場合、テナンシ(ユーザーが所属する)のデフォルト割当て制限が使用されます。 |
URIの例
https://api.oc.example.com/storage/volume/
リクエスト本文の例
{
"size": "10G",
"properties": [
"/oracle/public/storage/default"
],
"name": "/mytenant/public/vol1"
}
レスポンス本文の例
{
"status": "Initializing",
"account": "/mytenant/default",
"writecache": false,
"managed": true,
"description": null,
"tags": [],
"bootable": false,
"hypervisor": null,
"quota": null,
"uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
"status_detail": "The storage volume is currently being initialized.",
"imagelist_entry": -1,
"storage_pool": "/mytenant/public/mypool",
"machineimage_name": null,
"status_timestamp": "2015-06-01T11:15:57Z",
"shared": false,
"imagelist": null,
"size": "10737418240",
"properties": ["/oracle/public/storage/default"],
"name": "/mytenant/public/vol1"
}
このAPIを使用すると、特定のストレージ・ボリュームを削除できます。
メソッド
DELETE
注意:
自分のテナント内のプライベート・ボリュームのみを削除できます。RESTリソース
/storage/volume/name
URI
https://api_endpoint/storage/volume/name
URIパラメータ
| パラメータ | 説明 |
|---|---|
| name | ストレージ・ボリュームの名前 |
URIの例
https://api.oc.example.com/storage/volume/mytenant/public/vol1
このAPIを使用すると、特定のストレージ・ボリュームを更新できます。
メソッド
PUT
RESTリソース
/storage/volume/name
URI
https://api_endpoint/storage/volume/name
URIパラメータ
| パラメータ | 説明 |
|---|---|
| name | このストレージ・ボリュームの名前 |
リクエスト本文のパラメータ
| パラメータ | 説明 |
|---|---|
| description | (オプション)このストレージ・ボリュームの説明 |
| tags | (オプション)ストレージ・ボリュームをタグ付けする使いやすい文字列のリスト。 更新中に、指定済タグのリストが新しいリストになります。 既存のタグを保持するには、最初に既存のセットを取得してリストを変更し、次にリストを指定して更新する必要があります。 |
URIの例
https://api.oc.example.com/storage/volume/mytenant/public/vol1
リクエスト本文の例
{
"description": "Updated Storage Volume",
"tags": ["Accounting Department Block Storage"],
}
レスポンス本文の例
{
"status": "Online",
"account": "/mytenant/default",
"writecache": false,
"managed": true,
"description": "Updated Storage Volume",
"tags": ["Accounting Department Block Storage"],
"bootable": false,
"hypervisor": null,
"quota": null,
"uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
"status_detail": "The storage volume is online.",
"imagelist_entry": -1,
"storage_pool": "/mytenant/public/mypool",
"machineimage_name": null,
"status_timestamp": "2015-06-01T11:16:04Z",
"shared": false,
"imagelist": null,
"size": "10737418240",
"properties": ["/oracle/public/storage/default"],
"name": "/mytenant/public/vol1"
}
このAPIを使用すると、特定のコンテナ内のストレージ・ボリュームを検出できます。
注意:
検出APIコールは、指定されたコンテナ内のオブジェクトの名前を表示しますが、オブジェクトの詳細は表示しません。 オブジェクトの名前をリストするには、Acceptヘッダーをapplication/oracle-compute-v3+directory+jsonに設定します。 その他の目的では、Acceptヘッダーをapplication/oracle-compute-v3+jsonに設定する必要があります。 メソッド
GET
RESTリソース
/storage/volume/container
URI
https://api_endpoint/storage/volume/container/
URIパラメータ
| パラメータ | 説明 |
|---|---|
| container | ストレージ・ボリュームの階層名前空間。 |
URIの例
https://api.oc.example.com/storage/volume/mytenant/public/
レスポンス本文の例
{
"result": [
"/mytenant/public/vol1"
]
}
このAPIを使用すると、特定のストレージ・ボリュームの情報を取得できます。
メソッド
GET
RESTリソース
/storage/volume/name
URI
https://api_endpoint/storage/volume/name
URIパラメータ
| パラメータ | 説明 |
|---|---|
| name | ストレージ・ボリュームの名前 |
URIの例
https://api.oc.example.com/storage/volume/mytenant/public/vol1
レスポンス本文の例
{
"status": "Online",
"account": "/mytenant/default",
"writecache": false,
"managed": true,
"description": null,
"tags": [],
"bootable": false,
"hypervisor": null,
"quota": null,
"uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
"status_detail": "The storage volume is online.",
"imagelist_entry": -1,
"storage_pool": "/mytenant/public/mypool",
"machineimage_name": null,
"status_timestamp": "2015-06-01T11:16:04Z",
"shared": false,
"imagelist": null,
"size": "10737418240",
"properties": ["/oracle/public/storage/default"],
"name": "/mytenant/public/vol1"
}
このAPIを使用すると、ストレージ・ボリュームをリストできます。
メソッド
GET
RESTリソース
/storage/volume/container
URI
https://api_endpoint/storage/volume/container?tags=tagsValue"a=quotaValue&name=nameValue
URIパラメータ
注意:
このコマンドの出力は、オプションのパラメータ(指定されている場合)に基づいてフィルタ処理されます。| パラメータ | 説明 |
|---|---|
| container | ストレージ・ボリュームの階層名前空間 |
| tags=tagsValue | (オプション)ストレージ・ボリュームをタグ付けする使いやすい文字列のリスト |
| quota=quotaValue | (オプション)このボリュームの作成に適用される割当て制限 |
| name=nameValue | (オプション)ストレージ・ボリュームの名前 |
URIの例
https://api.oc.example.com/storage/volume/mytenant/public/
レスポンス本文の例
{"result": [
{
"status": "Online",
"account": "/mytenant/default",
"writecache": false,
"managed": true,
"description": null,
"tags": [],
"bootable": false,
"hypervisor": null,
"quota": null,
"uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
"status_detail": "The storage volume is online.",
"imagelist_entry": -1,
"storage_pool": "/mytenant/public/mypool",
"machineimage_name": null,
"status_timestamp": "2015-06-01T11:16:04Z",
"shared": false,
"imagelist": null,
"size": "10737418240",
"properties": ["/oracle/public/storage/default"],
"name": "/mytenant/public/vol1"
}
]
}