Getting Information About Your Snapshots

You can get information about your snapshots using AWS CLI.

If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

This procedure uses AWS CLI only. Information about these resources is also available from Cockpit. For more information, see Snapshots User Interface (for Cockpit v1) or the Snapshots dashboard (for Cockpit v2-beta).

Getting General Information About Your Snapshot

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.

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 users 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 the users who have permission to use a snapshot from Cockpit, you need to click on the Share/Unshare button. 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.

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.