Skip to main content

snapshot_schedules

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

Overview

Namesnapshot_schedules
TypeResource
Idaws.redshift.snapshot_schedules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
associated_cluster_countintegerThe number of clusters associated with the schedule.
associated_clustersstringA list of clusters associated with the schedule. A maximum of 100 clusters is returned.
next_invocationsstring
schedule_definitionsstringA list of ScheduleDefinitions.
schedule_descriptionstringThe description of the schedule.
schedule_identifierstringA unique identifier for the schedule.
tagsstringAn optional set of tags describing the schedule.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_snapshot_schedulesselectregionClusterIdentifier, ScheduleIdentifier, TagKeys, TagValues, Marker, MaxRecordsReturns a list of snapshot schedules.
create_snapshot_scheduleinsertregionScheduleDefinitions, ScheduleIdentifier, ScheduleDescription, Tags, DryRun, NextInvocationsCreate a snapshot schedule that can be associated to a cluster and which overrides the default system backup schedule.
modify_snapshot_scheduleupdateScheduleIdentifier, ScheduleDefinitions, regionModifies a snapshot schedule. Any schedule associated with a cluster is modified asynchronously.
modify_cluster_snapshot_scheduleupdateClusterIdentifier, regionScheduleIdentifier, DisassociateScheduleModifies a snapshot schedule for a cluster.
delete_snapshot_scheduledeleteScheduleIdentifier, regionDeletes a snapshot schedule.

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
ClusterIdentifierstringA unique identifier for the cluster whose snapshot schedule you want to modify.
ScheduleDefinitionsarrayAn updated list of schedule definitions. A schedule definition is made up of schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)".
ScheduleIdentifierstringA unique identifier of the snapshot schedule to delete.
regionstringAWS region (default: us-east-1)
ClusterIdentifierstringThe unique identifier for the cluster whose snapshot schedules you want to view.
DisassociateSchedulebooleanA boolean to indicate whether to remove the assoiciation between the cluster and the schedule.
DryRunboolean
MarkerstringA value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the marker parameter and retrying the command. If the marker field is empty, all response records have been retrieved for the request.
MaxRecordsintegerThe maximum number or response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.
NextInvocationsinteger
ScheduleDefinitionsarrayThe definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)".
ScheduleDescriptionstringThe description of the snapshot schedule.
ScheduleIdentifierstringA unique alphanumeric identifier for the schedule that you want to associate with the cluster.
TagKeysarrayThe key value for a snapshot schedule tag.
TagValuesarrayThe value corresponding to the key of the snapshot schedule tag.
TagsarrayAn optional set of tags you can use to search for the schedule.

SELECT examples

Returns a list of snapshot schedules.

SELECT
associated_cluster_count,
associated_clusters,
next_invocations,
schedule_definitions,
schedule_description,
schedule_identifier,
tags
FROM aws.redshift.snapshot_schedules
WHERE region = '{{ region }}' -- required
AND ClusterIdentifier = '{{ ClusterIdentifier }}'
AND ScheduleIdentifier = '{{ ScheduleIdentifier }}'
AND TagKeys = '{{ TagKeys }}'
AND TagValues = '{{ TagValues }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
;

INSERT examples

Create a snapshot schedule that can be associated to a cluster and which overrides the default system backup schedule.

INSERT INTO aws.redshift.snapshot_schedules (
region,
ScheduleDefinitions,
ScheduleIdentifier,
ScheduleDescription,
Tags,
DryRun,
NextInvocations
)
SELECT
'{{ region }}',
'{{ ScheduleDefinitions }}',
'{{ ScheduleIdentifier }}',
'{{ ScheduleDescription }}',
'{{ Tags }}',
'{{ DryRun }}',
'{{ NextInvocations }}'
RETURNING
associated_cluster_count,
associated_clusters,
next_invocations,
schedule_definitions,
schedule_description,
schedule_identifier,
tags
;

UPDATE examples

Modifies a snapshot schedule. Any schedule associated with a cluster is modified asynchronously.

UPDATE aws.redshift.snapshot_schedules
SET
-- No updatable properties
WHERE
ScheduleIdentifier = '{{ ScheduleIdentifier }}' --required
AND ScheduleDefinitions = '{{ ScheduleDefinitions }}' --required
AND region = '{{ region }}' --required
RETURNING
associated_cluster_count,
associated_clusters,
next_invocations,
schedule_definitions,
schedule_description,
schedule_identifier,
tags;

DELETE examples

Deletes a snapshot schedule.

DELETE FROM aws.redshift.snapshot_schedules
WHERE ScheduleIdentifier = '{{ ScheduleIdentifier }}' --required
AND region = '{{ region }}' --required
;