Obtenir des informations sur un export ou import de snapshot

Vous pouvez obtenir des informations sur un ou plusieurs exports ou imports de snapshot entre votre compte et un bucket.

Ces actions vous permettent de copier un snapshot vers un autre compte, ou d’en créer une sauvegarde. Pour en savoir plus, voir Exporter un snapshot sur un bucket ou Importer un snapshot depuis un bucket.

Obtenir des informations sur un export ou import de snapshot avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

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.

    • 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 (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.

    • 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.

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"
  }
}

Pages connexes

Méthodes API correspondantes