AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
ByFilter (Default)
Get-EC2Snapshot-OwnerId <String[]>-RestorableByUserId <String[]>-Filter <Filter[]>-MaxResult <Int32>-NextToken <String>-Select <String>-PassThru <SwitchParameter>-NoAutoIteration <SwitchParameter>-ClientConfig <AmazonEC2Config>ByID
Get-EC2Snapshot-SnapshotId <String[]>-Select <String>-PassThru <SwitchParameter>-NoAutoIteration <SwitchParameter>-ClientConfig <AmazonEC2Config>
all
group. All Amazon Web Services accounts have create volume permissions for these snapshots. OwnerIds
option, only snapshots from the specified owners and for which you have access are returned. The results can include the Amazon Web Services account IDs of the specified owners, amazon
for snapshots owned by Amazon, or self
for snapshots that you own.
If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify Amazon Web Services account IDs (if you own the snapshots), self
for snapshots for which you own or have explicit permissions, or all
for public snapshots.
If you are describing a long list of snapshots, we recommend that you paginate the output to make the list more manageable. The MaxResults
parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults
value, then that number of results is returned along with a NextToken
value that can be passed to a subsequent DescribeSnapshots
request to retrieve the remaining results.
To get the state of fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores.
For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
description
- A description of the snapshot.encrypted
- Indicates whether the snapshot is encrypted (true
| false
)owner-alias
- The owner alias, from an Amazon-maintained list (amazon
). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.owner-id
- The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.progress
- The progress of the snapshot, as a percentage (for example, 80%).snapshot-id
- The snapshot ID.start-time
- The time stamp when the snapshot was initiated.status
- The status of the snapshot (pending
| completed
| error
).storage-tier
- The storage tier of the snapshot (archive
| standard
).tag
:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner
and the value TeamA
, specify tag:Owner
for the filter name and TeamA
for the filter value.tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.volume-id
- The ID of the volume the snapshot is for.volume-size
- The size of the volume, in GiB.Required? | False |
Position? | 4 |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Filters |
DescribeSnapshots
in paginated output. When this parameter is used, DescribeSnapshots
only returns MaxResults
results in a single page along with a NextToken
response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots
request with the returned NextToken
value. This value can be between 5 and 1,000; if MaxResults
is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots
returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | MaxItems, MaxResults |
NextToken
value returned from a previous paginated DescribeSnapshots
request where MaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken
value. This value is null
when there are no more results to return.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
self
, and amazon
. Required? | False |
Position? | 2 |
Accept pipeline input? | True (ByPropertyName) |
Aliases | OwnerIds |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 3 |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RestorableByUserIds |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Aliases | SnapshotIds |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Get-EC2Snapshot -SnapshotId snap-12345678
DataEncryptionKeyId :
Description : Created by CreateImage(i-1a2b3c4d) for ami-12345678 from vol-12345678
Encrypted : False
KmsKeyId :
OwnerAlias :
OwnerId : 123456789012
Progress : 100%
SnapshotId : snap-12345678
StartTime : 10/23/2014 6:01:28 AM
State : completed
StateMessage :
Tags : {}
VolumeId : vol-12345678
VolumeSize : 8This example describes the specified snapshot.
Get-EC2Snapshot | ? { $_.Tags.Count -gt 0 -and $_.Tags.Key -eq "Name" }This example describes the snapshots that have a 'Name' tag.
Get-EC2Snapshot | ? { $_.Tags.Count -gt 0 -and $_.Tags.Key -eq "Name" -and $_.Tags.Value -eq "TestValue" }This example describes the snapshots that have a 'Name' tag with the value 'TestValue'.
Get-EC2Snapshot -Owner selfThis example describes all your snapshots.
AWS Tools for PowerShell: 2.x.y.z