Scan VM Instance Metadata on Primary Storage
Headers
Authorization: OAuth the-session-uuidCurl 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=44c3fde4ec863d679803d06c0cbc12f1Parameters
| Name | Type | Location | Description | Optional Values | Since |
|---|---|---|---|---|---|
| uuid | String | query | 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 | Since |
|---|---|---|---|
| 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 | Since |
|---|---|---|---|
| vmUuid | String | 5.0.0 | |
| vmName | String | 5.0.0 | |
| vmCategory | String | 5.0.0 | |
| architecture | String | 5.0.0 | |
| schemaVersion | String | 5.0.0 | |
| metadataPath | String | 5.0.0 | |
| hostUuid | String | 5.0.0 | |
| sizeBytes | Long | 5.0.0 | |
| lastUpdateTime | Long | 5.0.0 | |
| incomplete | boolean | 5.0.0 |
error
| Name | Type | Description | Since |
|---|---|---|---|
| code | String | Error code, which is the globally unique identifier of the error, such as SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Detailed information about 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. 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()