UpdateSnapshotScheduleCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { StorageGatewayClient, UpdateSnapshotScheduleCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, UpdateSnapshotScheduleCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // UpdateSnapshotScheduleInput
  VolumeARN: "STRING_VALUE", // required
  StartAt: Number("int"), // required
  RecurrenceInHours: Number("int"), // required
  Description: "STRING_VALUE",
  Tags: [ // Tags
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new UpdateSnapshotScheduleCommand(input);
const response = await client.send(command);
// { // UpdateSnapshotScheduleOutput
//   VolumeARN: "STRING_VALUE",
// };

Example Usage

 Loading code editorLoading code editor

UpdateSnapshotScheduleCommand Input

Parameter
Type
Description
RecurrenceInHours
Required
number | undefined

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

StartAt
Required
number | undefined

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.

VolumeARN
Required
string | undefined

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

Description
string | undefined

Optional description of the snapshot that overwrites the existing description.

Tags
Tag[] | undefined

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

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.

UpdateSnapshotScheduleCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
VolumeARN
string | undefined

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

Throws

Name
Fault
Details
InternalServerError
server

An internal server error has occurred during the request. For more information, see the error and message fields.

InvalidGatewayRequestException
client

An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

StorageGatewayServiceException
Base exception class for all service exceptions from StorageGateway service.