Skip to main content
Resource Center/Hardware/Host Operations/SR-IOV Operations
PUTSR-IOV OperationsSince 3.9.0SynchronousAuth Required

ChangeVmNicType

ChangeVmNicType

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

  • changevmnictypeObjectRequired

    changevmnictype request body object.

    • vmNicTypeStringRequired

      The VM NIC type.

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

    • lastOpDateTimestampRequired

      The last operation date.

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

      • lastOpDateTimestampRequired

        The last operation date.

Endpoint

PUT/zstack/v1/vm-instances/nics/{vmNicUuid}/actions

/zstack/v1/vm-instances/nics/{vmNicUuid}/actions

Operation ID

ChangeVmNicType

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/vm-instances/nics/{vmNicUuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"changevmnictype":{"vmNicType":"<vmNicType>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "bd44ea50e2573d5d9249c938dba0dad6", "vmInstanceUuid": "1311eba1f7e53c3aa816a140fd783068", "usedIpUuid": "464575b453d53e60941c7eeee08f3149", "l3NetworkUuid": "b62214c53fde3f6eb825bf2ce59e3d2e", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "hypervisorType": "KVM", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0.0, "type": "VF" } }

Change History

This API has no change history records yet.

View all change history