機械翻訳について

インスタンスの管理

インスタンスは、仮想マシン(VM)の論理表現です。 インスタンスは、仮想マシンのプロパティを定義し、取囲むライフ・サイクルおよび単一の仮想マシンのライフ・サイクルを超えて拡張するライフ・サイクルを持ちます。 オーケストレーションを開始して仮想マシン・インスタンスを作成しますが、その後は、CLIコマンドまたはAPIリクエストを使用して個別に管理できます。

注意:

インスタンスの状態を変更するライフサイクル・コマンド(startstoprestartなど)は、サーバー側の状態変化の進行状況を即時に戻します。 インスタンス状態は、インスタンス詳細を取得して監視できます。

インスタンスの削除

このAPIリクエストを使用すると、特定のインスタンスを削除できます。 インスタンスを削除できるのは、それが次のいずれかの状態の場合のみです:runningshut_downまたはerror

注意:

インスタンスが削除されると、関連付けられたオーケストレーションが、警告状態に変化します。 新しいインスタンスに関連付ける場合は、このオーケストレーションをstopstartする必要があります。

メソッド

DELETE

RESTリソース

/instance/name

URI

https://api_endpoint/instance/name

URIパラメータ

パラメータ 説明
name インスタンスの一意の階層名。 たとえば、/mytenant/public/e6640ebc-6953-444f-848d-4a3bf6050ea5です。

URIの例

https://api.oc.example.com/instance/mytenant/admin/f653a677-b566-4f92-8e93-71d47b364119

インスタンスの再起動

このAPIリクエストを使用すると、特定のインスタンスを再起動できます。 インスタンスを再起動できるのは、それが次のいずれかの状態の場合のみです: shut_downwarningまたはerror

メソッド

PUT

RESTリソース

/instance/name/

URI

https://api_endpoint/instance/name?action=RESTART

URIパラメータ

パラメータ 説明
name インスタンスの一意の階層名。 たとえば、/mytenant/public/e6640ebc-6953-444f-848d-4a3bf6050ea5eです。

URIの例

https://api.oc.example.com/instance/mytenant/public/test123/6fffcc31-5fc4-4d68-828e-5310229f8840?action=RESTART

インスタンスの停止

このAPIリクエストを使用すると、インスタンスを停止できます。

メソッド

PUT

RESTリソース

/instance/name /

URI

https://api_endpoint/instance/name?action=SHUTDOWN

URIパラメータ

パラメータ 説明
name インスタンスの一意の階層名。 たとえば、/mytenant/public/e6640ebc-6953-444f-848d-4a3bf6050ea5eです。

URIの例

https://api.oc.example.com/instance/mytenant/public/test123/6fffcc31-5fc4-4d68-828e-5310229f8840?action=SHUTDOWN

インスタンスの更新

このAPIリクエストを使用すると、特定のインスタンスのパラメータを更新できます。

メソッド

PUT

RESTリソース

/instance/name/

URI

https://api_endpoint/instance/name

URIパラメータ

パラメータ 説明
name インスタンスの一意の階層名。 たとえば、/mytenant/public/e6640ebc-6953-444f-848d-4a3bf6050ea5eです。

リクエスト本文のパラメータ

インスタンスを更新するには、GET /instance/name APIを使用して、インスタンス・パラメータの既存のリストをフェッチします。 インスタンス・パラメータのリストを使用して必要な変更を行い、それをPUT /instance/name APIリクエスト本文の一部として再送信できます。

注意:

インスタンスのすべてのパラメータを変更することはできません。

次の表に、変更可能なインスタンス・パラメータのリストを示します。

パラメータ 説明
shape (オプション)インスタンスに関連付けられるシェイプの名前。 シェイプを更新できるのは、インスタンスがshut_down状態の場合のみです。
networking (オプション)このインスタンスに関連付けられる仮想NICのネットワーク指定詞へのデバイス名のマッピング。 インスタンスを更新できるのは、それがrunning状態またはshut_down状態のいずれかの場合です。
nis (オプション) Network Information Service (NIS)の構成。 NIS構成を更新できるのは、インスタンスがrunning状態またはshut_down状態の場合のみです。

注意:

nisパラメータは、インスタンス定義の2つの場所に出現します。 最初の出現を更新します。
tags (オプション)インスタンスは、特定のインスタンスを識別する使いやすい文字列のリストにタグ付けすることができます。 任意の状態のインスタンスにタグを追加できます。

インスタンス・オプション・パラメータの詳細は、『Oracle Compute Cloud Serviceの使用』オーケストレーション・テンプレートに関する項を参照してください。

URIの例

http://api.oc.example.com/instance/mytenant/public/func_storage_12/2/c041981f-99a6-4af2-a31d-b3dce1fe719f

リクエスト本文の例


{
   "domain": "mytenant.public.host1.example.com.",
   "placement_requirements": ["/system/compute/placement/default",
   "/system/compute/allow_instances", "/system/infiniband/ready"],
   "ip": "192.168.120.4",
   "fingerprint": "",
   "site": "",
   "shape": "oc1",
   "nis": {"domain": "mytenant-domain", "servers": [{"ip": "111.11.11.111","name": "mytenant.nis.server1"}]},
   "imagelist": "/oracle/public/linux5_12.2.1.0.0_64",
   "networking": {"eth1": {"vnet": "/oracle/public/IPoIB-virt-admin",
   "dns": ["e47fdb.mytenant.public.host1.example.com."]}},
   "storage_attachments": [],
   "hostname": "e47fdb.mytenant.public.host1.example.com.",
   "quota_reservation": "/mytenant/cb4f9ecf-5ac7-4496-b8c9-26c10be8207c",
   "disk_attach": "",
   "label": "test2",
   "priority": "/oracle/public/default",
   "state": "shut_down",
   "virtio": false,
   "vnc": "10.0.0.49:5900",
   "tags": ["/mytenant/public/func_storage_12","78992f1753f37e2a687f743c0df14d38", "new tag"],
   "start_time": "2015-12-28T22:46:48Z",
   "quota": "/mytenant",
   "last_shutdown_time": null,
   "attributes":
    {
    "nis": {},
    "network": {"nimbula_vcable-eth1": {"net_config": {"owner": {"type": 
    "svcnet", "name": "IPoIB-virt-admin-2"}, "ip": "192.168.120.4",
    "netmask": "255.255.248.0", "type": "IPoIB", "membership": "limited"},
    "vethernet_id": "-1", "options": {}, "vethernet": 
    "/oracle/public/IPoIB-virt-admin", "address": [null, "192.168.120.4"],
    "model": "", "vethernet_type": "ipoib", "id": 
    "/mytenant/public/02855c15-c088-4f33-a120-dbe0c31388ae", "dhcp_options":[]}},
    "nimbula_orchestration": "/mytenant/public/func_storage_12",
    "dns": {"domain": "mytenant.public.host1.example.com.", "hostname": 
    "e47fdb.mytenant.public.host1.example.com.", "nimbula_vcable-eth1": 
    "e47fdb.mytenant.public.host1.example.com."},
    "sshkeys": []
    },
   "error_reason": null,
   "sshkeys": null,
   "resolvers": null,
   "account": "/mytenant/default",
   "name": 
   "/mytenant/public/func_storage_12/2/c041981f-99a6-4af2-a31d-b3dce1fe719f",
   "vcable_id": "/mytenant/public/02855c15-c088-4f33-a120-dbe0c31388ae",
   "uri": 
   "http://api.oc.example.com/instance/mytenant/public/func_storage_12/2/c041981f-99a6-4af2-a31d-b3dce1fe719f", 

   "reverse_dns": true,
   "entry": 1,
   "boot_order": []
}

インスタンスの詳細の取得

インスタンスの詳細を取得するには、REST APIを使用します。

インスタンスの検出

このAPIリクエストを使用すると、特定のコンテナおよびサブコンテナ内のインスタンスを検出できます。

注意:

検出APIコールは、指定されたコンテナ内のオブジェクトの名前を表示しますが、オブジェクトの詳細は表示しません。 オブジェクトの名前をリストするには、Acceptヘッダーをapplication/oracle-compute-v3+directory+jsonに設定します。 その他の目的では、Acceptヘッダーをapplication/oracle-compute-v3+jsonに設定する必要があります。

メソッド

GET

RESTリソース

/instance/container/

URI

https://api_endpoint/instance/container/

URIパラメータ

パラメータ 説明
container インスタンスを含む階層名前空間

URIの例

https://api.oc.example.com/instance/mytenant/public/

レスポンス本文の例

{"result": 
        [
                "/mytenant/public/primary_webserver/", 
                "/mytenant/public/secondary_webserver/"
        ]
}

インスタンスの取得

このAPIリクエストを使用すると、特定のインスタンスの情報を取得できます。

メソッド

GET

RESTリソース

/instance/name

URI

https://api_endpoint/instance/name

URIパラメータ

パラメータ 説明
name インスタンスの一意の階層名。 たとえば、/mytenant/public/e6640ebc-6953-444f-848d-4a3bf6050ea5です

URIの例

https://api.oc.example.com/instance/mytenant/public/dev1/f653a677-b566-4f92-8e93-71d47b364119

レスポンス本文の例

{
 "list": [
  {
   "domain": "mytenant...",
   "placement_requirements": [
    "/system/compute/placement/default",
    "/system/compute/allow_instances"
   ],
   "ip": "10...",
   "site": "",
   "shape": "oc5",
   "imagelist": "/oracle/public/oel_6.4_60GB",
   "attributes": {
    "network": {
     "nimbula_vcable-eth0": {
      "vethernet_id": "0",
      "vethernet": "/oracle/public/default",
      "address": [
       "c6:b0:09:f4:bc:c0",
       "0.0.0.0"
      ],
      "model": "",
      "vethernet_type": "vlan",
      "id": "/mytenant/public/016e75e7-e911-42d1-bfe1-6a7f1b3f7908",
      "dhcp_options": []
     }
    },
    "dns": {
     "domain": "mytenant...",
     "hostname": "d06886.mytenant...",
     "nimbula_vcable-eth0": "d06886.mytenant..."
    },
    "sshkeys": [
     "ssh-rsa AAAAB3NzaC1yc2EAAA..."
    ]
   },
   "networking": {
    "eth0": {
     "model": "",
     "dns": [
      "d06886.mytenant..."
     ],
     "seclists": [
      "/mytenant/default/default",
      "/mytenant/public/prod-ng"
     ],
     "vethernet": "/oracle/public/default",
     "nat": "ipreservation:/mytenant/public/prod-vm1"
    }
   },
   "hostname": "d06886.mytenant...",
   "quota_reservation": "/mytenant/ffc8e6d4-8f93-41f3-a062-bdbb042c3191",
   "disk_attach": "",
   "label": "Production instance 1",
   "priority": "/oracle/public/default",
   "state": "running",
   "vnc": "10...",
   "storage_attachments": [
    {
     "index": 1,
     "storage_volume_name": "/mytenant/public/prod-vol1",
     "name": "/mytenant/public/dev1/f653a677-b566-4f92-8e93-71d47b364119/f1a67244-9abc-45d5-af69-8..."
    }
   ],
   "start_time": "2014-06-24T17:51:35Z",
   "quota": "/mytenant",
   "fingerprint": "19:c4:3f:2d:dc:76:b1:06:e8:88:bd:7f:a3:3b:3c:93",
   "error_reason": "",
   "sshkeys": [
    "/mytenant/public/mytenant-prod-admin"
   ],
   "tags": [
    "prod2"
   ],
   "resolvers": null,
   "account": "mytenant/default",
   "name": "/mytenant/public/dev1/f653a677-b566-4f92-8e93-71d47b364119",
   "vcable_id": "/mytenant/public/016e75e7-e911-42d1-bfe1-6a7f1b3f7908",
   "uri": "http://10....",
   "reverse_dns": true,
   "entry": 1,
   "boot_order": []
  }
 ]
}

インスタンスのリスト表示

このAPIリクエストを使用すると、特定のコンテナおよびサブコンテナ内のインスタンス情報を取得できます。

メソッド

GET

RESTリソース

/instance/container/

URI

https://api_endpoint/instance/container/?tags=tagValue&quota=quotaValue&vcable_id=vcable_idValue

URIパラメータ

パラメータ 説明
container インスタンスの階層的な名前空間
tags=tagValue (オプション)インスタンスは、特定のインスタンスを識別する使いやすい文字列のリストにタグ付けすることができます
quota=quotaValue (オプション)インスタンスに関連付けられる割当て制限の名前
vcable_id=vcable_idValue (オプション)インスタンスに関連付けられる仮想ケーブル(vCable)の一意の識別子

URIの例

https://api.oc.example..com/instance/mytenant/

レスポンス本文の例

{
"result": 
        [{
                "domain": "mytenant.public.oc.example.com.",
                "placement_requirements": ["/system/compute/placement/default", 
                "/system/compute/allow_instances", 
                "/system/infiniband/ready"], 
                "ip": "10.128.206.94", 
                "fingerprint": "08:8f:8f:f9:f4:3c:19:ee:11:3c:0a:1f:fd:ee:1d:e9", 
                "site": "", 
                "shape": "oc3", 
                "nis": {}, 
                "imagelist": null, 
                "networking": {"eth0": {"seclists": [], 
                "vnetreservation": "/mytenant/public/instance1-wls-vm-1-instance1-wls-1-svcnet-1", 
                "options": 
                {
                        "hostname": "instance1-wls-1", 
                        "network_route": [], 
                        "dns": {"search_domains": "mytenant.public.oc.example.com", "servers": "192.168.126.1,192.168.126.2"}
                }, 
                "dns": [], 
                "address": []}, "eth4": {"seclists": [], "vnet": "/cloud/public/EoIB-OMS-c2", "dns": [], "address": []
............
}