Scan VM Instance Metadata on Primary Storage

GET/zstack/v1/primary-storage/vm-instances/metadata/scan

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/vm-instances/metadata/scan?uuid=44c3fde4ec863d679803d06c0cbc12f1

Parameters

NameTypeLocationDescriptionOptional ValuesSince
uuidStringqueryStorage UUID 5.0.0
systemTags (Optional)ListquerySystem tags 5.0.0
userTags (Optional)ListqueryUser tags 5.0.0

API Response

Response Example

{
  "vmInstanceMetadata": []
}
NameTypeDescriptionSince
successbooleanWhether the operation succeeded5.0.0
vmInstanceMetadataListFor details, see vmInstanceMetadata5.0.0
errorErrorCodeFor details, see error5.0.0

vmInstanceMetadata

NameTypeDescriptionSince
vmUuidString 5.0.0
vmNameString 5.0.0
vmCategoryString 5.0.0
architectureString 5.0.0
schemaVersionString 5.0.0
metadataPathString 5.0.0
hostUuidString 5.0.0
sizeBytesLong 5.0.0
lastUpdateTimeLong 5.0.0
incompleteboolean 5.0.0

error

NameTypeDescriptionSince
codeStringError code, which is the globally unique identifier of the error, such as SYS.1000 or HOST.10010.6
descriptionStringSummary description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. The default value is null.0.6
opaqueLinkedHashMapReserved field. The default value is null.0.6
causeErrorCodeRoot error that caused the current error. If there is no original error, this field is null.0.6

SDK Example

Java SDK

ScanVmInstanceMetadataFromPrimaryStorageAction action = new ScanVmInstanceMetadataFromPrimaryStorageAction();
action.uuid = "44c3fde4ec863d679803d06c0cbc12f1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ScanVmInstanceMetadataFromPrimaryStorageAction.Result res = action.call();

Python SDK

action = ScanVmInstanceMetadataFromPrimaryStorageAction()
action.uuid = "44c3fde4ec863d679803d06c0cbc12f1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()