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.

  • 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 (between 1`and `1000, 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.

  • 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