UpdateSnapshotSchedule
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.
Request Syntax
{
"Description": "string
",
"RecurrenceInHours": number
,
"StartAt": number
,
"Tags": [
{
"Key": "string
",
"Value": "string
"
}
],
"VolumeARN": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Description
-
Optional description of the snapshot that overwrites the existing description.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- RecurrenceInHours
-
Frequency of snapshots. Specify the number of hours between snapshots.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 24.
Required: Yes
- StartAt
-
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: Integer
Valid Range: Minimum value of 0. Maximum value of 23.
Required: Yes
- 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.
Type: Array of Tag objects
Required: No
- VolumeARN
-
The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.
Type: String
Length Constraints: Minimum length of 50. Maximum length of 500.
Pattern:
arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*)):storagegateway:[a-z\-0-9]+:[0-9]+:gateway\/(.+)\/volume\/vol-(\S+)
Required: Yes
Response Syntax
{
"VolumeARN": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- VolumeARN
-
The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.
Type: String
Length Constraints: Minimum length of 50. Maximum length of 500.
Pattern:
arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*)):storagegateway:[a-z\-0-9]+:[0-9]+:gateway\/(.+)\/volume\/vol-(\S+)
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
An internal server error has occurred during the request. For more information, see the error and message fields.
HTTP Status Code: 400
- InvalidGatewayRequestException
-
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
HTTP Status Code: 400
Examples
Example request
The following example shows a request that updates a snapshot schedule.
Sample Request
POST / HTTP/1.1
Host: storagegateway.us-east-2.amazonaws.com
x-amz-Date: 20120425T120000Z
Authorization: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG
Content-type: application/x-amz-json-1.1
x-amz-target: StorageGateway_20130630.UpdateSnapshotSchedule
{
"VolumeARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB",
"StartAt": "0",
"RecurrenceInHours": "1",
"Description": "hourly snapshot"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG
Date: Wed, 25 Apr 2012 12:00:02 GMT
Content-type: application/x-amz-json-1.1
Content-length: 99
{
"VolumeARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: