fast_snapshot_restores
Creates, updates, deletes, gets or lists a fast_snapshot_restores resource.
Overview
| Name | fast_snapshot_restores |
| Type | Resource |
| Id | aws.ec2.fast_snapshot_restores |
Fields
The following fields are returned by SELECT queries:
- describe_fast_snapshot_restores
| Name | Datatype | Description |
|---|---|---|
availability_zone | string | The Availability Zone. |
availability_zone_id | string | The ID of the Availability Zone. |
disabled_time | string | The time at which fast snapshot restores entered the disabled state. |
disabling_time | string | The time at which fast snapshot restores entered the disabling state. |
enabled_time | string | The time at which fast snapshot restores entered the enabled state. |
enabling_time | string | The time at which fast snapshot restores entered the enabling state. |
optimizing_time | string | The time at which fast snapshot restores entered the optimizing state. |
owner_alias | string | The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use. |
owner_id | string | The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. |
snapshot_id | string | The ID of the snapshot. |
state | string | The state of fast snapshot restores. |
state_transition_reason | string | The reason for the state transition. The possible values are as follows: Client.UserInitiated - The state successfully transitioned to enabling or disabling. Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_fast_snapshot_restores | select | region | Filter, MaxResults, NextToken, DryRun | Describes the state of fast snapshot restores for your snapshots. |
disable_fast_snapshot_restores | exec | SourceSnapshotId, region | AvailabilityZone, AvailabilityZoneId, DryRun | Disables fast snapshot restores for the specified snapshots in the specified Availability Zones. |
enable_fast_snapshot_restores | exec | SourceSnapshotId, region | AvailabilityZone, AvailabilityZoneId, DryRun | Enables fast snapshot restores for the specified snapshots in the specified Availability Zones. You get the full benefit of fast snapshot restores after they enter the enabled state. For more information, see Amazon EBS fast snapshot restore in the Amazon EBS User Guide. |
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 |
|---|---|---|
SourceSnapshotId | array | The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot that was shared with you from another Amazon Web Services account. |
region | string | AWS region (default: us-east-1) |
AvailabilityZone | array | One or more Availability Zones. For example, us-east-2a. Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both. |
AvailabilityZoneId | array | One or more Availability Zone IDs. For example, use2-az1. Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both. |
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. The possible values are: availability-zone: The Availability Zone of the snapshot. For example, us-east-2a. availability-zone-id: The ID of the Availability Zone of the snapshot. For example, use2-az1. owner-id: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot. snapshot-id: The ID of the snapshot. state: The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled). |
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. |
SELECT examples
- describe_fast_snapshot_restores
Describes the state of fast snapshot restores for your snapshots.
SELECT
availability_zone,
availability_zone_id,
disabled_time,
disabling_time,
enabled_time,
enabling_time,
optimizing_time,
owner_alias,
owner_id,
snapshot_id,
state,
state_transition_reason
FROM aws.ec2.fast_snapshot_restores
WHERE region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;
Lifecycle Methods
- disable_fast_snapshot_restores
- enable_fast_snapshot_restores
Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.
EXEC aws.ec2.fast_snapshot_restores.disable_fast_snapshot_restores
@SourceSnapshotId='{{ SourceSnapshotId }}' --required,
@region='{{ region }}' --required,
@AvailabilityZone='{{ AvailabilityZone }}',
@AvailabilityZoneId='{{ AvailabilityZoneId }}',
@DryRun={{ DryRun }}
;
Enables fast snapshot restores for the specified snapshots in the specified Availability Zones. You get the full benefit of fast snapshot restores after they enter the enabled state. For more information, see Amazon EBS fast snapshot restore in the Amazon EBS User Guide.
EXEC aws.ec2.fast_snapshot_restores.enable_fast_snapshot_restores
@SourceSnapshotId='{{ SourceSnapshotId }}' --required,
@region='{{ region }}' --required,
@AvailabilityZone='{{ AvailabilityZone }}',
@AvailabilityZoneId='{{ AvailabilityZoneId }}',
@DryRun={{ DryRun }}
;