资源中心/网络资源/VPC相关接口
POSTVPC Operations起始版本 2.3同步需要认证
创建VPC路由器
创建VPC路由器
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
paramsObject必填请求体参数结构
nameString必填资源名称
virtualRouterOfferingUuidString必填云路由规格
descriptionString资源的详细描述
resourceUuidString资源的UUID
zoneUuidString区域UUID
clusterUuidString集群UUID
hostUuidString物理机UUID
primaryStorageUuidForRootVolumeString主存储UUID。若指定,路由器的根云盘会在指定主存储创建
rootVolumeSystemTagsList路由器根盘所需要的系统标签
systemTagsList系统标签。
userTagsList用户标签。
响应状态
请求地址
POST/zstack/v1/vpc/virtual-routers
/zstack/v1/vpc/virtual-routers
请求示例
curl -X POST 'http://{host}/zstack/v1/vpc/virtual-routers' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","virtualRouterOfferingUuid":"<virtualRouterOfferingUuid>","description":"<description>","resourceUuid":"<resourceUuid>","zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuidForRootVolume":"<primaryStorageUuidForRootVolume>","rootVolumeSystemTags":["<rootVolumeSystemTags>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "applianceVmType": "vpcvrouter", "managementNetworkUuid": "a01fad3eb1d14bd787b8830e1d287ee3", "status": "Connected", "agentPort": 7272.0, "uuid": "4de286dcb34343a0b5dedaea96307c06", "name": "TestVPC", "description": "this is a vpc for test", "zoneUuid": "88634bc51a1345b98058c1827999bd75", "clusterUuid": "5ebca05bc3cf4d5b970ddb32b10455c0", "imageUuid": "490043dfeb814b119f0f6c264ed6bb1e", "hostUuid": "a19572ae4fcc4b7d8a090d06c99067fa", "lastHostUuid": "d374797d2d01495cb4dedd9e452909d0", "instanceOfferingUuid": "8fcc3c2b5e1b41e586ed07ffece475e4", "rootVolumeUuid": "ed5b232109f64f0dbe3342ffa8924d14", "platform": "Linux", "defaultL3NetworkUuid": "2aedc4cd00f8495f8fc08c991dd7be4c", "type": "ApplianceVm", "hypervisorType": "KVM", "memorySize": 8.589934592E9, "cpuNum": 4.0, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 9, 2017 4:20:39 PM", "lastOpDate": "Nov 9, 2017 4:20:39 PM", "state": "Running", "vmNics": [ { "uuid": "6c8b46eec225440bb7179b6c797937ed", "vmInstanceUuid": "4de286dcb34343a0b5dedaea96307c06", "usedIpUuid": "033b876b861f4b9abaf594a893c1c94f", "l3NetworkUuid": "49e2d31895c94bf0808372360ebcae31", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0.0, "createDate": "Nov 9, 2017 4:20:39 PM", "lastOpDate": "Nov 9, 2017 4:20:39 PM" } ], "allVolumes": [ { "uuid": "ed5b232109f64f0dbe3342ffa8924d14", "name": "Root-Volume-For-VM-4de286dcb34343a0b5dedaea96307c06", "primaryStorageUuid": "c3f1cbaf9b014c1d8989ff940ed5593a", "vmInstanceUuid": "4de286dcb34343a0b5dedaea96307c06", "diskOfferingUuid": "93bfd802ebea486ab4ce071967235b76", "rootImageUuid": "490043dfeb814b119f0f6c264ed6bb1e", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-ed5b232109f64f0dbe3342ffa8924d14/ed5b232109f64f0dbe3342ffa8924d14.qcow2", "type": "Root", "format": "qcow2", "size": 1.073741824E11, "actualSize": 2.147483648E10, "deviceId": 0.0, "state": "Enabled", "status": "Ready", "createDate": "Nov 9, 2017 4:20:39 PM", "lastOpDate": "Nov 9, 2017 4:20:39 PM" } ] } }变更历史
此 API 暂无变更历史记录。
