虚拟私有云

添加网卡

2022-06-13 09:47:47

接口名

URI

请求方法

添加网卡

/v3/AddNetworkCard

POST

参数列表

参数名

类型

是否必选

描述


regionid

String

资源池ID, 例:100054c0416811e9a6690242ac110002


vm_id

String

云主机ID, 例:913bc544-20d9-49b5-a37b-780c468f3d17


subnet_uuid

String

子网ID, 例:e7f140b0-aa7d-4cdd-9e1f-7fbe47147a76


network_uuid

String

网卡ID, 例:7fd7e5a6-cf3e-4b54-8880-58f254380238


ipaddress可选

String

ip地址, 例:192.168.0.37


security_group_uuids可选

String

安全组uuid, 例:d26e6aed-9d61-45bb-a628-3312c75ec775


请求示例


HTTP Body:

 

{

    "regionId": "100054xxxx",

    "vm_id": "2da8083b-e5axxxx",

    "subnet_uuid": "e7f140b0-aaxxxx",

    "network_uuid": "7fd7e5a6-cf3xxxx",

    "ipaddress": "192.168.0.37",

    "security_group_uuids": "d26e6aed-9d6xxxx"

}


返回示例


{

    "statusCode": 800,

    "returnObj": {

        "code": 200,

        "current_count": 1,

        "errcode": "SUCCESS",

        "errstatus": 0,

        "logmark": "1624895915642880669",

        "msg": "add nic successfully!",

        "next": null,

        "previous": null,

        "results": [{"jobid": "os-3f637276-8261-4f82-bcb6-8e93dba45f6a"}],

        "total_count": 1

    }

}