forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
12 KiB
12 KiB
Adding NICs to an ECS in a Batch
Function
This API is used to add one or multiple NICs to an ECS.
Request
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nics |
Yes |
Array of objects |
Specifies the NICs to be added. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
subnet_id |
Yes |
String |
Specifies the information about the NICs to be added to an ECS. The value must be the ID of a created network in UUID format. |
security_groups |
No |
Array of objects |
Specifies the security groups for NICs. For details, see Table 4. |
ip_address |
No |
String |
Specifies the IP address. If this parameter is unavailable, the IP address is automatically assigned. |
Response
See Responses (Task).
Example Request
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/nics
{ "nics": [ { "subnet_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23", "security_groups": [ { "id": "f0ac4394-7e4a-4409-9701-ba8be283dbc3" } ] } ] }
Example Response
{ "job_id": "70a599e0-31e7-49b7-b260-868f441e862b" }
Returned Values
Error Codes
See Error Codes.
Parent topic: NIC Management