EC2 / Client / restore_snapshot_from_recycle_bin

restore_snapshot_from_recycle_bin#

EC2.Client.restore_snapshot_from_recycle_bin(**kwargs)#

Restores a snapshot from the Recycle Bin. For more information, see Restore snapshots from the Recycle Bin in the Amazon EBS User Guide.

See also: AWS API Documentation

Request Syntax

response = client.restore_snapshot_from_recycle_bin(
    SnapshotId='string',
    DryRun=True|False
)
Parameters:
  • SnapshotId (string) –

    [REQUIRED]

    The ID of the snapshot to restore.

  • 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.

Return type:

dict

Returns:

Response Syntax

{
    'SnapshotId': 'string',
    'OutpostArn': 'string',
    'Description': 'string',
    'Encrypted': True|False,
    'OwnerId': 'string',
    'Progress': 'string',
    'StartTime': datetime(2015, 1, 1),
    'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
    'VolumeId': 'string',
    'VolumeSize': 123,
    'SseType': 'sse-ebs'|'sse-kms'|'none'
}

Response Structure

  • (dict) –

    • SnapshotId (string) –

      The ID of the snapshot.

    • OutpostArn (string) –

      The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon EBS User Guide.

    • Description (string) –

      The description for the snapshot.

    • Encrypted (boolean) –

      Indicates whether the snapshot is encrypted.

    • OwnerId (string) –

      The ID of the Amazon Web Services account that owns the EBS snapshot.

    • Progress (string) –

      The progress of the snapshot, as a percentage.

    • StartTime (datetime) –

      The time stamp when the snapshot was initiated.

    • State (string) –

      The state of the snapshot.

    • VolumeId (string) –

      The ID of the volume that was used to create the snapshot.

    • VolumeSize (integer) –

      The size of the volume, in GiB.

    • SseType (string) –

      Reserved for future use.