9.4. メソッド

9.4.1. 新しいデータセンターの作成

新規データセンターの作成には namelocal の要素が必要です。

例9.3 データセンターの作成

POST /api/datacenters HTTP/1.1
Accept: application/xml
Content-type: application/xml

<data_center>
    <name>NewDatacenter</name>
    <local>false</local>
</data_center>

9.4.2. データセンターの更新

namedescriptionstorage_typeversionstorage_format の各要素は、作成後に更新が可能です。

例9.4 データセンターの更新

PUT /api/datacenters/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<data_center>
    <name>UpdatedName</name>
    <description>An updated description for the data center</description>
</data_center>

9.4.3. データセンターの削除

データセンターを削除するには、DELETE 要求を実行する必要があります。

例9.5 データセンターの削除

DELETE /api/datacenters/00000000-0000-0000-0000-000000000000 HTTP/1.1

HTTP/1.1 204 No Content