Skip to main content

fast_snapshot_restores

Creates, updates, deletes, gets or lists a fast_snapshot_restores resource.

Overview

Namefast_snapshot_restores
TypeResource
Idaws.ec2.fast_snapshot_restores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availability_zonestringThe Availability Zone.
availability_zone_idstringThe ID of the Availability Zone.
disabled_timestringThe time at which fast snapshot restores entered the disabled state.
disabling_timestringThe time at which fast snapshot restores entered the disabling state.
enabled_timestringThe time at which fast snapshot restores entered the enabled state.
enabling_timestringThe time at which fast snapshot restores entered the enabling state.
optimizing_timestringThe time at which fast snapshot restores entered the optimizing state.
owner_aliasstringThe Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.
owner_idstringThe ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.
snapshot_idstringThe ID of the snapshot.
statestringThe state of fast snapshot restores.
state_transition_reasonstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_fast_snapshot_restoresselectregionFilter, MaxResults, NextToken, DryRunDescribes the state of fast snapshot restores for your snapshots.
disable_fast_snapshot_restoresexecSourceSnapshotId, regionAvailabilityZone, AvailabilityZoneId, DryRunDisables fast snapshot restores for the specified snapshots in the specified Availability Zones.
enable_fast_snapshot_restoresexecSourceSnapshotId, regionAvailabilityZone, AvailabilityZoneId, DryRunEnables 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.

NameDatatypeDescription
SourceSnapshotIdarrayThe 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.
regionstringAWS region (default: us-east-1)
AvailabilityZonearrayOne or more Availability Zones. For example, us-east-2a. Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.
AvailabilityZoneIdarrayOne or more Availability Zone IDs. For example, use2-az1. Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.
DryRunbooleanChecks 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.
FilterarrayThe 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).
MaxResultsintegerThe 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.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

SELECT examples

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

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 }}
;