Skip to main content
Resource Center/Hardware/SAN Storage Operations/FC Storage Operations
POSTFC Storage OperationsSince 3.1.0SynchronousAuth Required

AttachScsiLunToVmInstance

AttachScsiLunToVmInstance

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    The SCSI LUN UUID.

  • vmInstanceUuidStringRequired

    The VM instance UUID.

  • disableMultiPathAttachString

    Optional. Whether to turn off the switch for automatically attaching multi-path devices.

Body Fields

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

  • inventoryScsiLunInventoryRequired

    See inventory.

    • nameStringRequired

      The resource UUID.

    • uuidStringRequired

      The iSCSI target UUID.

    • wwidStringRequired

      The device WWID.

    • vendorStringRequired

      The device vendor.

    • modelStringRequired

      The device model.

    • wwnStringRequired

      The device WWN.

    • serialStringRequired

      The device serial No.

    • typeStringRequired

      The device type.

    • pathStringRequired

      The device path.

    • stateStringRequired

      The device state.

    • sizeLongRequired

      The device size.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • scsiLunHostRefsListRequired

      See scsiLunHostRefs.

      • scsiLunUuidStringRequired

        The SCSI LUN UUID.

      • hostUuidStringRequired

        The host UUID.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

    • scsiLunVmInstanceRefsListRequired

      See scsiLunVmInstanceRefs.

      • scsiLunUuidStringRequired

        The SCSI LUN UUID.

      • vmInstanceUuidStringRequired

        The VM instance UUID.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

Endpoint

POST/zstack/v1/vm-instances/{vmInstanceUuid}/scsi-lun/{uuid}

/zstack/v1/vm-instances/{vmInstanceUuid}/scsi-lun/{uuid}

Operation ID

AttachScsiLunToVmInstance

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-instances/{vmInstanceUuid}/scsi-lun/{uuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "name": "fc-lun-36b083fe000daf018000022905ba35d8f", "uuid": "d20114f179003943904fee1127d16eba", "wwid": "36b083fe000daf018000022905ba35d8f", "vendor": "DELL", "model": "MD32xx", "wwn": "0x6f01faf000d5c3e7", "serial": "6b083fe000daf018000015505abbe00a", "type": "mpath", "path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11", "size": 5.49755813888E12, "scsiLunHostRefs": [ { "id": 1.0, "scsiLunUuid": "d20114f179003943904fee1127d16eba", "hostUuid": "e62d261d3f293e0182f85779e105eb13", "createDate": "Nov 14, 2017 10:20:57 PM" } ], "scsiLunVmInstanceRefs": [ { "id": 1.0, "scsiLunUuid": "d20114f179003943904fee1127d16eba", "vmInstanceUuid": "84af387a5ef034818cc8488eaddbf5f3", "createDate": "Nov 14, 2017 10:20:57 PM", "attachMultipath": false } ], "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } }

Change History

This API has no change history records yet.

View all change history