Create interface
| Method | URI | Description | 
|---|---|---|
| POST | /v2/{tenant_id}/servers/{server_id}/os-interface | 仮想サーバにポートをアタッチするためのポートインターフェースを作成して使用します。 | 
Normal response codes: 200
Request
下表は、インターフェース作成リクエストのURIパラメーターの一覧です。
| Name | Type | Description | 
|---|---|---|
| {tenant_id} | String | プロジェクトID | 
| {server_id} | UUID | 対象とする仮想サーバの仮想サーバID | 
下表は、インターフェース作成リクエストのボディ部のパラメーターの一覧です。
| Name | Type | Description | 
|---|---|---|
| interfaceAttachment | String | リクエストボディでinterfaceAttachmentアクションを指定してください。 | 
| port_id | UUID | インターフェースを作成するポートID
                net_idとport_idは、いずれか片方のみ指定可能です。  | 
           
| net_id | UUID | ポートインターフェースを作成するネットワークID。
                net_idとport_idは、いずれか片方のみ指定可能です。  | 
           
| fixed_ips | array | 固定IPアドレス。 ネットワークIDを指定せずに任意の固定IPアドレスを指定した場合、Bad Request(400)エラーが返却されます。  | 
           
Example. Create interface: JSON request
ポートID指定によるインターフェース作成。
       {
         "interfaceAttachment": {
           "port_id": "ce531f90-199f-48c0-816c-13e38010b442"
         }
       }
     
     
     ネットワークIDおよび固定IPアドレス指定によるインターフェース作成。
       {
         "interfaceAttachment": {
           "fixed_ips": [
             {
               "ip_address": "192.168.1.3"
             }
           ],
           "net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6"
         }
       }
     
     
   Response
Example. Create interface: JSON response
       {
         "interfaceAttachment": {
           "fixed_ips": [
             {
               "ip_address": "192.168.1.1",
               "subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef"
             }
           ],
           "mac_addr": "fa:16:3e:4c:2c:30",
           "net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
           "port_id": "ce531f90-199f-48c0-816c-13e38010b442",
           "port_state": "ACTIVE"
         }
       }