Getting Information About a Snapshot Export or Import Task
You can get information about one or more snapshot export or import tasks between your account and a bucket.
These actions enable you to copy a snapshot to another account, or to store a backup on a bucket. For more information, see Exporting a Snapshot to a Bucket or Importing a Snapshot from a Bucket.
Getting Information About a Snapshot Export or Import Task Using OSC CLI
The ReadSnapshotExportTasks command lists one or more snapshot export tasks.
$ osc-cli api ReadSnapshotExportTasks --profile "default" \
--Filters '{
"TaskIds": ["snap-export-12345678"]
}'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters
: (optional) One or more filters.-
TaskIds
: (optional) The IDs of the export tasks.
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadSnapshotExportTasks command returns the following elements:
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
SnapshotExportTasks
: Information about one or more snapshot export tasks.-
Comment
: If the snapshot export task fails, an error message appears. -
OsuExport
: Information about the snapshot export task.-
DiskImageFormat
: The format of the export disk (qcow2
|raw
). -
OsuBucket
: The name of the OOS bucket the snapshot is exported to. -
OsuPrefix
: The prefix for the key of the OOS object corresponding to the snapshot.
-
-
Progress
: The progress of the snapshot export task, as a percentage. -
SnapshotId
: The ID of the snapshot to be exported. -
State
: The state of the snapshot export task (pending
|active
|completed
|failed
). -
Tags
: One or more tags associated with the snapshot export task.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
TaskId
: The ID of the snapshot export task.
-
{
"SnapshotExportTasks": [
{
"Tags": [],
"TaskId": "snap-export-12345678",
"Comment": "Export of snapshot snap-12345678",
"OsuExport": {
"OsuPrefix": "PREFIX",
"OsuBucket": "BUCKET",
"DiskImageFormat": "qcow2"
},
"State": "pending",
"SnapshotId": "snap-12345678",
"Progress": 99
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Getting Information About a Snapshot Export or Import Task Using oapi-cli
The ReadSnapshotExportTasks command lists one or more snapshot export tasks.
$ oapi-cli --profile "default" ReadSnapshotExportTasks \
--Filters '{
"TaskIds": ["snap-export-12345678"]
}'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters
: (optional) One or more filters.-
TaskIds
: (optional) The IDs of the export tasks.
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadSnapshotExportTasks command returns the following elements:
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
SnapshotExportTasks
: Information about one or more snapshot export tasks.-
Comment
: If the snapshot export task fails, an error message appears. -
OsuExport
: Information about the snapshot export task.-
DiskImageFormat
: The format of the export disk (qcow2
|raw
). -
OsuBucket
: The name of the OOS bucket the snapshot is exported to. -
OsuPrefix
: The prefix for the key of the OOS object corresponding to the snapshot.
-
-
Progress
: The progress of the snapshot export task, as a percentage. -
SnapshotId
: The ID of the snapshot to be exported. -
State
: The state of the snapshot export task (pending
|active
|completed
|failed
). -
Tags
: One or more tags associated with the snapshot export task.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
TaskId
: The ID of the snapshot export task.
-
{
"SnapshotExportTasks": [
{
"Tags": [],
"TaskId": "snap-export-12345678",
"Comment": "Export of snapshot snap-12345678",
"OsuExport": {
"OsuPrefix": "PREFIX",
"OsuBucket": "BUCKET",
"DiskImageFormat": "qcow2"
},
"State": "pending",
"SnapshotId": "snap-12345678",
"Progress": 99
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Related Pages
Corresponding API Methods