批量创建辅助弹性网卡
功能介绍
批量创建辅助弹性网卡。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。
URI
POST /v3/{project_id}/vpc/sub-network-interfaces/batch-create
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID。 获取方式请参见获取项目ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
dry_run |
否 |
Boolean |
|
sub_network_interface |
是 |
创建辅助弹性网卡的请求体。 |
|
count |
是 |
Integer |
批量创建辅助弹性网卡的个数。 最小值:1 最大值:10 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
virsubnet_id |
是 |
String |
|
parent_id |
是 |
String |
|
security_groups |
否 |
Array of strings |
|
description |
否 |
String |
|
ipv6_enable |
否 |
Boolean |
|
project_id |
否 |
String |
|
allowed_address_pairs |
否 |
Array of AllowAddressPair objects |
|
响应参数
状态码: 201
参数 |
参数类型 |
描述 |
---|---|---|
request_id |
String |
请求ID。 |
sub_network_interfaces |
Array of SubNetworkInterface objects |
批量创建辅助弹性网卡的响应体。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
|
virsubnet_id |
String |
|
private_ip_address |
String |
|
ipv6_ip_address |
String |
|
mac_address |
String |
|
parent_device_id |
String |
|
parent_id |
String |
|
description |
String |
|
vpc_id |
String |
|
vlan_id |
Integer |
|
security_groups |
Array of strings |
|
tags |
Array of ResourceTag objects |
|
project_id |
String |
|
created_at |
String |
|
allowed_address_pairs |
Array of AllowAddressPair objects |
|
state |
String |
|
instance_id |
String |
|
instance_type |
String |
|
scope |
String |
|
security_enabled |
Boolean |
|
请求示例
批量创建3个辅助弹性网卡,虚拟子网id为115b5a84-31dc-4b1e-8de9-bf5a75d2c566,宿主网络接口id为8b6c46f1-c68d-4bba-a922-2d97da185af5,关联安全组6727c950-9f01-47a2-a7aa-7d3686c4c95b。
POST https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces/batch-create { "sub_network_interface" : { "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5" }, "count" : 3 }
响应示例
状态码: 201
POST操作正常返回,更多状态码请参见状态码。
{ "sub_network_interfaces" : [ { "id" : "d1f8094c-bb3d-43c5-b625-52dd43eab451", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.245", "ipv6_ip_address" : "2001:db8:a583:5d:11e8:b908:4fe6:9802", "mac_address" : "fa:16:3e:97:1f:f5", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 41, "instance_type" : "", "instance_id" : "", "tags" : [ ] }, { "id" : "0dce57ab-00de-443b-a7fe-e8ff68bd95bc", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.75", "ipv6_ip_address" : "2001:db8:a583:5d:6c22:8ea2:c061:a802", "mac_address" : "fa:16:3e:5a:61:84", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 42, "instance_type" : "", "instance_id" : "", "tags" : [ ] }, { "id" : "1eca03ee-c0f1-4434-9c4c-87fe4426718c", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.194", "ipv6_ip_address" : "2001:db8:a583:5d:2b45:a3ae:17db:ec02", "mac_address" : "fa:16:3e:b8:ec:6d", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 43, "instance_type" : "", "instance_id" : "", "tags" : [ ] } ], "request_id" : "344544c1-d053-4ad3-b673-900a0e01db7e" }
状态码
状态码 |
描述 |
---|---|
201 |
POST操作正常返回,更多状态码请参见状态码。 |
错误码
请参见错误码。