Resource Center/Network Resource/VPC Operations
POSTVPC OperationsSince 2.3SynchronousAuth Required
CreateVpcVRouter
CreateVpcVRouter
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe resource name.
virtualRouterOfferingUuidStringRequiredThe vRouter offering UUID.
descriptionStringOptional. The detailed description of the resource.
resourceUuidStringOptional. The resource UUID.
zoneUuidStringOptional. The zone UUID.
clusterUuidStringOptional. The cluster UUID.
hostUuidStringOptional. The host UUID.
primaryStorageUuidForRootVolumeStringOptional. The primary storage UUID.
rootVolumeSystemTagsListOptional. The system tags required by VPC vRouter root volume.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vpc/virtual-routers
/zstack/v1/vpc/virtual-routers
Request Example
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>"]}'
Response Example
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" } ] } }Change History
This API has no change history records yet.
