Getting Information About an OMI Export or Import Task

You can get information about the state and characteristics of one or more OMI exports or imports to a bucket.

These actions enable you to either copy an OMI to another account, or to create a backup of it stored in a bucket. For more information, see Exporting an OMI to a Bucket.

Getting Information About an OMI Export or Import Task Using OSC CLI

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.

The ReadImageExportTasks command returns the following elements:

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

  • ResponseContext: Information about the context of the response.

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

Related Pages

Corresponding API Methods