DescribeLockedSnapshots
Retrieves lock information for a snapshot, such as its lock status and settings.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeLockedSnapshots |
list |
Snapshot
Snapshot
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region. You can call the DescribeRegions operation to query the latest list of Alibaba Cloud regions. |
cn-hangzhou |
| SnapshotIds |
array |
No |
An array of 1 to 100 snapshot IDs. |
|
|
string |
No |
The snapshot ID. |
s-bp67acfmxazb4p**** |
|
| LockStatus |
string |
No |
The lock status of the snapshot. Valid values:
|
compliance-cooloff |
| NextToken |
string |
No |
The token used to retrieve the next page of results. Set this parameter to the |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The number of entries to return on each page. Maximum value: 100. Default value:
|
10 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of the response |
||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| NextToken |
string |
The token used to retrieve the next page of results. If this parameter is not returned, it indicates that all results have been returned. |
caeba0bbb2be03f84eb48b699f0a**** |
| LockedSnapshotsInfo |
array<object> |
A list of locked snapshots. |
|
|
object |
Details about a locked snapshot. |
||
| SnapshotId |
string |
The snapshot ID. |
s-bp67acfmxazb4p**** |
| LockMode |
string |
The lock mode. The only possible value is:
|
compliance |
| LockStatus |
string |
The lock status. Possible values:
|
compliance-cooloff |
| LockCreationTime |
string |
The time when the snapshot was locked, in UTC. The time is formatted as |
2025-10-15T10:00:00Z |
| CoolOffPeriod |
integer |
The duration of the cool-off period in compliance mode, in hours. |
3 |
| CoolOffPeriodExpiredTime |
string |
The time when the cool-off period ends, in UTC. The time is formatted as |
2025-10-15T13:00:00Z |
| LockDuration |
integer |
The duration of the lock in days. The snapshot is automatically unlocked when this duration expires. |
1 |
| LockDurationStartTime |
string |
The time when the lock duration starts, in UTC. The time is formatted as |
2025-10-15T10:00:00Z |
| LockExpiredTime |
string |
The time when the lock expires, in UTC. The time is formatted as |
2025-10-16T10:00:00Z |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"LockedSnapshotsInfo": [
{
"SnapshotId": "s-bp67acfmxazb4p****",
"LockMode": "compliance",
"LockStatus": "compliance-cooloff",
"LockCreationTime": "2025-10-15T10:00:00Z",
"CoolOffPeriod": 3,
"CoolOffPeriodExpiredTime": "2025-10-15T13:00:00Z",
"LockDuration": 1,
"LockDurationStartTime": "2025-10-15T10:00:00Z",
"LockExpiredTime": "2025-10-16T10:00:00Z"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidLockStatus.Malformed | The specified parameter LockStatus is invalid. Please check the valid range for this parameter. | The specified parameter LockStatus is invalid. Please check the valid range for this parameter. |
| 404 | InvalidSnapshotLock.NotFound | The specified snapshot(s) %s is(are) not locked. | The specified snapshot is not locked. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.