Getting Information About Your Snapshots

You can get information about your snapshots using AWS CLI.

Getting Information About Your Snapshots Using Cockpit v2

See the Snapshots dashboard.

Getting Information About Your Snapshots Using OSC CLI

The ReadSnapshots command lists one or more snapshots that are available to you and the permissions to create volumes from them.

Request sample
$ osc-cli api ReadSnapshots --profile "default" \
    --Filters '{
        "SnapshotIds": ["snap-12345678"]
      }'
Request sample
$ osc-cli api ReadSnapshots --profile "default" \
    --Filters '{
        "TagKeys": ["env"],
        "TagValues": ["prod", "test"]
      }'

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.

    • AccountAliases: (optional) The account aliases of the owners of the snapshots.

    • AccountIds: (optional) The account IDs of the owners of the snapshots.

    • Descriptions: (optional) The descriptions of the snapshots.

    • FromCreationDate: (optional) The beginning of the time period, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).

    • PermissionsToCreateVolumeAccountIds: (optional) The account IDs which have permissions to create volumes.

    • PermissionsToCreateVolumeGlobalPermission: (optional) If true, lists all public volumes. If false, lists all private volumes.

    • Progresses: (optional) The progresses of the snapshots, as a percentage.

    • SnapshotIds: (optional) The IDs of the snapshots.

    • States: (optional) The states of the snapshots (in-queue | pending | completed | error | deleting).

    • TagKeys: (optional) The keys of the tags associated with the snapshots.

    • TagValues: (optional) The values of the tags associated with the snapshots.

    • Tags: (optional) The key/value combination of the tags associated with the snapshots, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • ToCreationDate: (optional) The end of the time period, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • VolumeIds: (optional) The IDs of the volumes used to create the snapshots.

    • VolumeSizes: (optional) The sizes of the volumes used to create the snapshots, in gibibytes (GiB).

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

  • Snapshots: Information about one or more snapshots and their permissions.

    • AccountAlias: The account alias of the owner of the snapshot.

    • AccountId: The account ID of the owner of the snapshot.

    • CreationDate: The date and time (UTC) at which the snapshot was created.

    • Description: The description of the snapshot.

    • PermissionsToCreateVolume: Permissions for the resource.

      • AccountIds: One or more account IDs that the permission is associated with.

      • GlobalPermission: A global permission for all accounts.
        (Request) Set this parameter to true to make the resource public (if the parent parameter is Additions) or to make the resource private (if the parent parameter is Removals).
        (Response) If true, the resource is public. If false, the resource is private.

    • Progress: The progress of the snapshot, as a percentage.

    • SnapshotId: The ID of the snapshot.

    • State: The state of the snapshot (in-queue | pending | completed | error | deleting)).

    • Tags: One or more tags associated with the snapshot.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VolumeId: The ID of the volume used to create the snapshot.

    • VolumeSize: The size of the volume used to create the snapshot, in gibibytes (GiB).

Result sample
{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Snapshot created from a volume",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample
{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Test snapshot",
      "Tags": [
        {
          "Value": "test",
          "Key": "env"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Your Snapshots Using oapi-cli

The ReadSnapshots command lists one or more snapshots that are available to you and the permissions to create volumes from them.

Request sample
$ oapi-cli --profile "default" ReadSnapshots \
    --Filters '{
        "SnapshotIds": ["snap-12345678"]
      }'
Request sample
$ oapi-cli --profile "default" ReadSnapshots \
    --Filters '{
        "TagKeys": ["env"],
        "TagValues": ["prod", "test"]
      }'

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.

    • AccountAliases: (optional) The account aliases of the owners of the snapshots.

    • AccountIds: (optional) The account IDs of the owners of the snapshots.

    • Descriptions: (optional) The descriptions of the snapshots.

    • FromCreationDate: (optional) The beginning of the time period, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).

    • PermissionsToCreateVolumeAccountIds: (optional) The account IDs which have permissions to create volumes.

    • PermissionsToCreateVolumeGlobalPermission: (optional) If true, lists all public volumes. If false, lists all private volumes.

    • Progresses: (optional) The progresses of the snapshots, as a percentage.

    • SnapshotIds: (optional) The IDs of the snapshots.

    • States: (optional) The states of the snapshots (in-queue | pending | completed | error | deleting).

    • TagKeys: (optional) The keys of the tags associated with the snapshots.

    • TagValues: (optional) The values of the tags associated with the snapshots.

    • Tags: (optional) The key/value combination of the tags associated with the snapshots, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • ToCreationDate: (optional) The end of the time period, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • VolumeIds: (optional) The IDs of the volumes used to create the snapshots.

    • VolumeSizes: (optional) The sizes of the volumes used to create the snapshots, in gibibytes (GiB).

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

  • Snapshots: Information about one or more snapshots and their permissions.

    • AccountAlias: The account alias of the owner of the snapshot.

    • AccountId: The account ID of the owner of the snapshot.

    • CreationDate: The date and time (UTC) at which the snapshot was created.

    • Description: The description of the snapshot.

    • PermissionsToCreateVolume: Permissions for the resource.

      • AccountIds: One or more account IDs that the permission is associated with.

      • GlobalPermission: A global permission for all accounts.
        (Request) Set this parameter to true to make the resource public (if the parent parameter is Additions) or to make the resource private (if the parent parameter is Removals).
        (Response) If true, the resource is public. If false, the resource is private.

    • Progress: The progress of the snapshot, as a percentage.

    • SnapshotId: The ID of the snapshot.

    • State: The state of the snapshot (in-queue | pending | completed | error | deleting)).

    • Tags: One or more tags associated with the snapshot.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VolumeId: The ID of the volume used to create the snapshot.

    • VolumeSize: The size of the volume used to create the snapshot, in gibibytes (GiB).

Result sample
{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Snapshot created from a volume",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample
{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Test snapshot",
      "Tags": [
        {
          "Value": "test",
          "Key": "env"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Your Snapshots Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

Getting General Information About Your Snapshots

You can get general information about a snapshot, like the ID of the volume from which it was created, the tags associated with it, or its status.

To get information about your snapshots, use the describe-snapshots command following this syntax:

Request sample
$ aws ec2 describe-snapshots \
    --profile YOUR_PROFILE  \
    --snapshot-id snap-12345678 \
    --filters Name=TAG_NAME,Values=TAG_VALUE \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) snapshot-id: One or more snapshot IDs. If no snapshot ID is specified, the request returns a description of all your snapshots.

  • (optional) filters: One or more filters, in the "Name=X,Values=Y" format.

    You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.

    The following filters are available:

    • description: The description of the snapshot.

    • owner-alias: The account alias of the owner of the snapshot.

    • owner-id: The account ID of the owner of the snapshot.

    • progress: The progress of the snapshot, as a percentage.

    • snapshot-id: The ID of the snapshot.

    • start-time: The time at which the snapshot was initiated.

    • status: The state of the snapshot (in-queue | completed | error ).

    • volume-id: The ID of the volume used to create the snapshot.

    • volume-size: The size of the volume used to create the snapshot, in gibibytes (GiB).

    • tag-key: The key of a tag associated with the resource.

    • tag-value: The value of a tag associated with the resource.

    • tag:XXXX: The value of a tag associated with the resource, where XXXX is the key of the tag.

      To filter a tag whose key is XXXX and value is YYYY, you can therefore use either of the following two formats:

      • --filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY

      • --filters Name=tag:XXXX,Values=YYYY

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The describe-snapshots command returns the following elements:

  • Description: The description of the snapshot.

  • Encrypted: The encryption of a volume (true | false).

  • Tags: One or more tags associated with your snapshot.

  • VolumeId: The ID of the volume from which it was created.

  • State: The state of the snapshot.

  • VolumeSize: The size of the volume used to create the snapshot, in gibibytes (GiB).

  • Progress: The progress of the snapshot, as a percentage.

  • SnapshotId: The ID of the snapshot.

  • OwnerId: The account ID of the owner of the snapshot.

Result sample
{
    "Description": "Created by CreateImage i-12345678 for ami-12345678 from volume-12345678",
    "Encrypted": false,
    "Tags": [],
    "VolumeId": "vol-12345678",
    "State": "completed",
    "VolumeSize": 10,
    "Progress": "100%",
    "SnapshotId": "snap-87654321",
    "OwnerId": "123456789012"
}

Getting Information About Permissions for a Snapshot

You can get information about the list of accounts who have permission to create a volume from the specified snapshot. You can modify these permissions at any time. For more information, see Managing Permissions for a Snapshot.

To get information about a snapshot permission, use the describe-snapshot-attribute command following this syntax:

Request sample
$ aws ec2 describe-snapshot-attribute \
    --profile YOUR_PROFILE  \
    --snapshot-id snap-12345678 \
    --attribute createVolumePermission \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • snapshot-id: The ID of the snapshot.

  • attribute: The snapshot attribute you want to get information about (must be set to createVolumePermission).

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The describe-snapshot-attribute command returns the following elements:

  • SnapshotId: The ID of the snapshot.

  • CreateVolumePermission: Information about one or more permissions for creating volumes from the snapshot. This element contains the following information:

    • UserId: One or more account IDs you shared the snapshot with.

    • Group: The name of the group with which you shared the snapshot (all if the snapshot is public, otherwise empty).

Result sample
{
    "SnapshotId": "snap-1234578",
    "CreateVolumePermissions": [
        {
            "UserId": "1234567899999",
            "Group": "",
        }
    ]
}

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.