AWS Storage Gateway

2019/05/14 - AWS Storage Gateway - 2 updated api methods

Changes  Add Tags parameter to CreateSnapshot and UpdateSnapshotSchedule APIs, used for creating tags on create for one off snapshots and scheduled snapshots.

CreateSnapshot (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Initiates a snapshot of a volume.

AWS Storage Gateway provides the ability to back up point-in-time snapshots of your data to Amazon Simple Storage (S3) for durable off-site recovery, as well as import the data to an Amazon Elastic Block Store (EBS) volume in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway volume on a scheduled or ad hoc basis. This API enables you to take ad-hoc snapshot. For more information, see Editing a Snapshot Schedule .

In the CreateSnapshot request you identify the volume by providing its Amazon Resource Name (ARN). You must also provide description for the snapshot. When AWS Storage Gateway takes the snapshot of specified volume, the snapshot and description appears in the AWS Storage Gateway Console. In response, AWS Storage Gateway returns you a snapshot ID. You can use this snapshot ID to check the snapshot progress or later use it when you want to create a volume from a snapshot. This operation is only supported in stored and cached volume gateway type.

Note

To list or delete a snapshot, you must use the Amazon EC2 API. For more information, see DescribeSnapshots or DeleteSnapshot in the EC2 API reference .

Warning

Volume and snapshot IDs are changing to a longer length ID format. For more information, see the important note on the Welcome page.

See also: AWS API Documentation

Request Syntax

client.create_snapshot(
    VolumeARN='string',
    SnapshotDescription='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type VolumeARN

string

param VolumeARN

[REQUIRED]

The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.

type SnapshotDescription

string

param SnapshotDescription

[REQUIRED]

Textual description of the snapshot that appears in the Amazon EC2 console, Elastic Block Store snapshots panel in the Description field, and in the AWS Storage Gateway snapshot Details pane, Description field

type Tags

list

param Tags

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value pair.

Note

Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

  • (dict) --

    A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /

    • Key (string) -- [REQUIRED]

      Tag key (String). The key can't start with aws:.

    • Value (string) -- [REQUIRED]

      Value of the tag key.

rtype

dict

returns

Response Syntax

{
    'VolumeARN': 'string',
    'SnapshotId': 'string'
}

Response Structure

  • (dict) --

    A JSON object containing the following fields:

    • VolumeARN (string) --

      The Amazon Resource Name (ARN) of the volume of which the snapshot was taken.

    • SnapshotId (string) --

      The snapshot ID that is used to refer to the snapshot in future operations such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots ) or creating a volume from a snapshot ( CreateStorediSCSIVolume ).

UpdateSnapshotSchedule (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Updates a snapshot schedule configured for a gateway volume. This operation is only supported in the cached volume and stored volume gateway types.

The default snapshot schedule for volume is once every 24 hours, starting at the creation time of the volume. You can use this API to change the snapshot schedule configured for the volume.

In the request you must identify the gateway volume whose snapshot schedule you want to update, and the schedule information, including when you want the snapshot to begin on a day and the frequency (in hours) of snapshots.

See also: AWS API Documentation

Request Syntax

client.update_snapshot_schedule(
    VolumeARN='string',
    StartAt=123,
    RecurrenceInHours=123,
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type VolumeARN

string

param VolumeARN

[REQUIRED]

The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.

type StartAt

integer

param StartAt

[REQUIRED]

The hour of the day at which the snapshot schedule begins represented as hh , where hh is the hour (0 to 23). The hour of the day is in the time zone of the gateway.

type RecurrenceInHours

integer

param RecurrenceInHours

[REQUIRED]

Frequency of snapshots. Specify the number of hours between snapshots.

type Description

string

param Description

Optional description of the snapshot that overwrites the existing description.

type Tags

list

param Tags

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value pair.

Note

Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

  • (dict) --

    A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /

    • Key (string) -- [REQUIRED]

      Tag key (String). The key can't start with aws:.

    • Value (string) -- [REQUIRED]

      Value of the tag key.

rtype

dict

returns

Response Syntax

{
    'VolumeARN': 'string'
}

Response Structure

  • (dict) --

    A JSON object containing the of the updated storage volume.

    • VolumeARN (string) --

      The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.