ScanVmInstanceMetadataFromPrimaryStorage

Scan Virtual Machine Instance Metadata From Data Storage

API Request

URLs
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
Parameter List
Name Type Location Description Allowed Values Starting Version
uuid String query Data Storage UUID 5.0.0
systemTags (Optional) List query System tags 5.0.0
userTags (Optional) List query User tags 5.0.0

API Response

Response Example
{
  "vmInstanceMetadata": []
}
Name Type Description Starting Version
success boolean Whether the operation succeeded 5.0.0
vmInstanceMetadata List For details, see vmInstanceMetadata 5.0.0
error ErrorCode For details, see error 5.0.0
#vmInstanceMetadata
Name Type Description Starting Version
vmUuid String The VM instance UUID. 5.0.0
vmName String The VM instance name. 5.0.0
vmCategory String The VM instance category. 5.0.0
architecture String The architecture. 5.0.0
schemaVersion String The schema version. 5.0.0
metadataPath String The metadata path. 5.0.0
hostUuid String The host UUID. 5.0.0
sizeBytes Long The size bytes. 5.0.0
lastUpdateTime Long The last update time. 5.0.0
incomplete boolean The incomplete. 5.0.0
regenerateUuidRequired boolean Whether the virtual machine UUID must be regenerated when the metadata is registered 5.1.0
#error
Name Type Description Starting Version
code String Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 0.6
description String Summary description of the error 0.6
details String Details of the error 0.6
elaboration String Reserved field. The default value is null 0.6
opaque LinkedHashMap Reserved field. The default value is null 0.6
cause ErrorCode Root error that caused the current error. This field is null if there is no source error 0.6

SDK Examples

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()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center