Skip to main content
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

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The resource name.

    • virtualRouterOfferingUuidStringRequired

      The vRouter offering UUID.

    • descriptionString

      Optional. The detailed description of the resource.

    • resourceUuidString

      Optional. The resource UUID.

    • zoneUuidString

      Optional. The zone UUID.

    • clusterUuidString

      Optional. The cluster UUID.

    • hostUuidString

      Optional. The host UUID.

    • primaryStorageUuidForRootVolumeString

      Optional. The primary storage UUID.

    • rootVolumeSystemTagsList

      Optional. The system tags required by VPC vRouter root volume.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryVmInstanceInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • zoneUuidStringRequired

      The zone UUID.

    • clusterUuidStringRequired

      The cluster UUID.

    • imageUuidStringRequired

      The image UUID.

    • hostUuidStringRequired

      The host UUID.

    • lastHostUuidStringRequired

      The UUID of the host where the vRouter VM instance was running last time.

    • instanceOfferingUuidStringRequired

      The instance offering UUID.

    • rootVolumeUuidStringRequired

      The root volume UUID.

    • platformStringRequired

      The operating platform of the vRouter device.

    • architectureStringRequired

      No description provided.

    • defaultL3NetworkUuidStringRequired

      The default L3 network UUID.

    • typeStringRequired

      The vRouter device type.

    • hypervisorTypeStringRequired

      The hypervisor type of the vRouter device.

    • memorySizeLongRequired

      The memory size.

    • cpuNumIntegerRequired

      The CPU count.

    • cpuSpeedLongRequired

      The CPU speed.

    • allocatorStrategyStringRequired

      The allocator strategy.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • stateStringRequired

      Thea state of the vRouter device.

    • guestOsTypeStringRequired

      No description provided.

    • vmNicsListRequired

      See vmNics.

      • uuidStringRequired

        The resource UUID.

      • vmInstanceUuidStringRequired

        The VM instance UUID.

      • l3NetworkUuidStringRequired

        The L3 network UUID.

      • ipStringRequired

        The IP address.

      • macStringRequired

        The MAC address.

      • hypervisorTypeStringRequired

        No description provided.

      • netmaskStringRequired

        The netmask.

      • gatewayStringRequired

        The gateway.

      • metaDataStringRequired

        The reserved field for internal use.

      • deviceIdIntegerRequired

        The device ID. Indicates the sequence (an integer) of the NIC on the Ethernet device of the guest operating system. For example, 0 means eth0, while 1 means eth1.

      • internalNameStringRequired

        内部名称。

      • deviceIdIntegerRequired

        设备ID。

      • typeStringRequired

        类型。

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

      • usedIpsListRequired

        See usedIps

        • uuidStringRequired

          The resource UUID.

        • ipRangeUuidStringRequired

          The IP range UUID.

        • l3NetworkUuidStringRequired

          The L3 network UUID.

        • ipVersionIntegerRequired

          IP版本。

        • ipStringRequired

          来源IP地址。

        • netmaskStringRequired

          No description provided.

        • gatewayStringRequired

          No description provided.

        • usedForStringRequired

          已使用用于。

        • ipInLonglongRequired

          No description provided.

        • vmNicUuidStringRequired

          The VM NIC UUID.

        • createDateTimestampRequired

          The creation date.

        • lastOpDateTimestampRequired

          The last operation date.

    • allVolumesListRequired

      See allVolumes.

      • uuidStringRequired

        The resource UUID.

      • nameStringRequired

        The resource name.

      • descriptionStringRequired

        The detailed description of the resource.

      • primaryStorageUuidStringRequired

        The primary storage UUID.

      • vmInstanceUuidStringRequired

        The VM instance UUID.

      • diskOfferingUuidStringRequired

        The disk offering UUID.

      • rootImageUuidStringRequired

        The root image UUID.

      • installPathStringRequired

        The installation path.

      • typeStringRequired

        The volume type.

      • formatStringRequired

        The volume format.

      • sizeLongRequired

        The virtual size of the volume.

      • actualSizeLongRequired

        The actual size of the volume.

      • deviceIdIntegerRequired

        The device ID.

      • stateStringRequired

        The state of the volume.

      • statusStringRequired

        The status of the volume.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

      • volumeQosStringRequired

        No description provided.

      • lastDetachDateTimestampRequired

        最近一次detach时间。

      • lastVmInstanceUuidStringRequired

        最近一次云主机实例UUID。

      • isShareableBooleanRequired

        Whether the volume is shareable.

    • vmCdRomsListRequired

      See vmCdRoms.

Endpoint

POST/zstack/v1/vpc/virtual-routers

/zstack/v1/vpc/virtual-routers

Operation ID

CreateVpcVRouter

Permalink

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.

View all change history