Skip to main content
Resource Center/Resource Pool/VM Instance Operations
POSTVM Instance OperationsSince 4.1.0SynchronousAuth Required

ChangeVmNicNetwork

ChangeVmNicNetwork

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • vmNicUuidStringRequired

    The VM NIC UUID.

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • destL3NetworkUuidStringRequired

      No description provided.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • 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.

  • inventoryVmNicInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • vmInstanceUuidStringRequired

      The VM UUID.

    • l3NetworkUuidStringRequired

      The L3 network UUID.

    • ipStringRequired

      The IP address.

    • macStringRequired

      The MAC address.

    • hypervisorTypeStringRequired

      The hypervisor type.

    • netmaskStringRequired

      The netmask.

    • gatewayStringRequired

      The gateway.

    • metaDataStringRequired

      元数据。

    • ipVersionIntegerRequired

      The IP version.

    • deviceIdIntegerRequired

      The device ID.

    • typeStringRequired

      The NIC type.

    • createDateTimestampRequired

      The creation time.

    • lastOpDateTimestampRequired

      The last update time.

    • usedIpsListRequired

      See usedIps

      • uuidStringRequired

        The resource UUID.

      • ipRangeUuidStringRequired

        The IP range UUID.

      • l3NetworkUuidStringRequired

        The L3 network UUID.

      • ipVersionIntegerRequired

        The IP version.

      • ipStringRequired

        The IP address.

      • netmaskStringRequired

        The netmask.

      • gatewayStringRequired

        The gateway.

      • usedForStringRequired

        已使用用于。

      • ipInLonglongRequired

        No description provided.

      • vmNicUuidStringRequired

        The VM NIC UUID.

      • createDateTimestampRequired

        The creation time.

      • lastOpDateTimestampRequired

        The last update time.

Endpoint

POST/zstack/v1/vm-instances/nics/{vmNicUuid}/l3-networks/{l3NetworkUuid}

/zstack/v1/vm-instances/nics/{vmNicUuid}/l3-networks/{l3NetworkUuid}

Operation ID

ChangeVmNicNetwork

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-instances/nics/{vmNicUuid}/l3-networks/{l3NetworkUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"destL3NetworkUuid":"<destL3NetworkUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "9d4cdab9192b3de3b2495b1e326910c7", "vmInstanceUuid": "0ae9a1992fb436a58e820bdcb4dd17c4", "usedIpUuid": "c0c5860c05ce3e70b14b4f501fedff71", "l3NetworkUuid": "9390346b3a8a3c829b05dbe30569390a", "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 } }

Change History

This API has no change history records yet.

View all change history