DescribeLockedSnapshots
Queries the lock information of snapshots, such as the lock status and lock configurations.
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 region ID. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| SnapshotIds |
array |
No |
The snapshot IDs. Array length: 1 to 100. |
|
|
string |
No |
The snapshot ID. |
s-bp67acfmxazb4p**** |
|
| LockStatus |
string |
No |
The lock status. Valid values:
|
compliance-cooloff |
| NextToken |
string |
No |
The query token. Set the value to the NextToken parameter value returned by the previous API call. |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The number of entries per page during paging for a paged query. Maximum value: 100. Default value:
|
10 |
| DryRun |
boolean |
No |
Specifies whether to only precheck the request. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| NextToken |
string |
The query token returned by the current call. |
caeba0bbb2be03f84eb48b699f0a**** |
| LockedSnapshotsInfo |
array<object> |
The locked snapshots information. |
|
|
object |
The locked snapshot information. |
||
| SnapshotId |
string |
The snapshot ID. |
s-bp67acfmxazb4p**** |
| LockMode |
string |
The lock mode. Valid values:
|
compliance |
| LockStatus |
string |
The lock status. Valid values:
|
compliance-cooloff |
| LockCreationTime |
string |
The time when the snapshot was locked. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in accordance with the ISO 8601 standard. UTC+0 is used. |
2025-10-15T10:00:00Z |
| CoolOffPeriod |
integer |
The cooling-off period in compliance mode. Unit: hours. |
3 |
| CoolOffPeriodExpiredTime |
string |
The time when the cooling-off period in compliance mode ends. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in accordance with the ISO 8601 standard. UTC+0 is used. |
2025-10-15T13:00:00Z |
| LockDuration |
integer |
The lock duration. The snapshot lock automatically expires after the lock duration ends. Unit: days. |
1 |
| LockDurationStartTime |
string |
The time when the lock duration starts. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in accordance with the ISO 8601 standard. UTC+0 is used. If you lock a snapshot that is in the progressing state, the lock duration is calculated only after the snapshot enters the accomplished state. |
2025-10-15T10:00:00Z |
| LockExpiredTime |
string |
The time when the lock expires. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in accordance with the ISO 8601 standard. UTC+0 is used. |
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.