locked_snapshots
Creates, updates, deletes, gets or lists a locked_snapshots resource.
Overview
| Name | locked_snapshots |
| Type | Resource |
| Id | aws.ec2.locked_snapshots |
Fields
The following fields are returned by SELECT queries:
- describe_locked_snapshots
| Name | Datatype | Description |
|---|---|---|
cool_off_period | integer | The compliance mode cooling-off period, in hours. |
cool_off_period_expires_on | string | The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). |
lock_created_on | string | The date and time at which the snapshot was locked, in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). |
lock_duration | integer | The period of time for which the snapshot is locked, in days. |
lock_duration_start_time | string | The date and time at which the lock duration started, in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). If you lock a snapshot that is in the pending state, the lock duration starts only once the snapshot enters the completed state. |
lock_expires_on | string | The date and time at which the lock will expire, in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). |
lock_state | string | The state of the snapshot lock. Valid states include: compliance-cooloff - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions. governance - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions. compliance - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions. expired - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted. |
owner_id | string | The account ID of the Amazon Web Services account that owns the snapshot. |
snapshot_id | string | The ID of the snapshot. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_locked_snapshots | select | region | Filter, MaxResults, NextToken, SnapshotId, DryRun | Describes the lock status for a snapshot. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | The filters. lock-state - The state of the snapshot lock (compliance-cooloff | governance | compliance | expired). |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
NextToken | string | The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
SnapshotId | array | The IDs of the snapshots for which to view the lock status. |
SELECT examples
- describe_locked_snapshots
Describes the lock status for a snapshot.
SELECT
cool_off_period,
cool_off_period_expires_on,
lock_created_on,
lock_duration,
lock_duration_start_time,
lock_expires_on,
lock_state,
owner_id,
snapshot_id
FROM aws.ec2.locked_snapshots
WHERE region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND SnapshotId = '{{ SnapshotId }}'
AND DryRun = '{{ DryRun }}'
;