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.

Request sample
$ 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.

The ReadSnapshotExportTasks command returns the following elements:

  • ResponseContext: Information about the context of the response.

  • SnapshotExportTasks: Information about one or more snapshot export tasks.

Result sample
{
  "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