Obtenir des informations sur une tâche d’export ou d’import d’OMI

Vous pouvez obtenir des informations sur l’état et les caractéristiques d’un ou plusieurs exports ou imports d’OMI vers un bucket.

Ces actions vous permettent soit de copier l’OMI vers un autre compte, soit d’en créer un backup sur un bucket. Pour en savoir plus, voir Copier une OMI vers d’autres Régions.

Obtenir des informations sur une tâche d’export ou d’import d’OMI avec OSC CLI

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

The ReadImageExportTasks command lists one or more image export tasks.

Request sample
$ osc-cli api ReadImageExportTasks --profile "default" \
    --Filters '{
        "TaskIds": ["image-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 ReadImageExportTasks command returns the following elements:

  • ImageExportTasks: Information about one or more image export tasks.

    • Comment: If the OMI export task fails, an error message appears.

    • ImageId: The ID of the OMI to be exported.

    • OsuExport: Information about the OMI export task.

      • DiskImageFormat: The format of the export disk (qcow2 | raw).

      • OsuBucket: The name of the OOS bucket the OMI is exported to.

      • OsuManifestUrl: The URL of the manifest file.

      • OsuPrefix: The prefix for the key of the OOS object corresponding to the image.

    • Progress: The progress of the OMI export task, as a percentage.

    • State: The state of the OMI export task (pending/queued | pending | completed | failed | cancelled).

    • Tags: One or more tags associated with the image 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 OMI export task.

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

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ImageExportTasks": [
    {
      "Tags": [],
      "ImageId": "ami-12345678",
      "TaskId": "image-export-12345678",
      "Comment": "Export of image ami-12345678",
      "OsuExport": {
        "OsuPrefix": "PREFIX/ami-12345678/",
        "OsuBucket": "BUCKET",
        "DiskImageFormat": "qcow2"
      },
      "State": "pending/queued",
      "Progress": 0
    }
  ]
}

Pages connexes

Méthodes API correspondantes