snapshot_schedules
Creates, updates, deletes, gets or lists a snapshot_schedules resource.
Overview
| Name | snapshot_schedules |
| Type | Resource |
| Id | aws.redshift.snapshot_schedules |
Fields
The following fields are returned by SELECT queries:
- describe_snapshot_schedules
| Name | Datatype | Description |
|---|---|---|
associated_cluster_count | integer | The number of clusters associated with the schedule. |
associated_clusters | string | A list of clusters associated with the schedule. A maximum of 100 clusters is returned. |
next_invocations | string | |
schedule_definitions | string | A list of ScheduleDefinitions. |
schedule_description | string | The description of the schedule. |
schedule_identifier | string | A unique identifier for the schedule. |
tags | string | An optional set of tags describing the schedule. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_snapshot_schedules | select | region | ClusterIdentifier, ScheduleIdentifier, TagKeys, TagValues, Marker, MaxRecords | Returns a list of snapshot schedules. |
create_snapshot_schedule | insert | region | ScheduleDefinitions, ScheduleIdentifier, ScheduleDescription, Tags, DryRun, NextInvocations | Create a snapshot schedule that can be associated to a cluster and which overrides the default system backup schedule. |
modify_snapshot_schedule | update | ScheduleIdentifier, ScheduleDefinitions, region | Modifies a snapshot schedule. Any schedule associated with a cluster is modified asynchronously. | |
modify_cluster_snapshot_schedule | update | ClusterIdentifier, region | ScheduleIdentifier, DisassociateSchedule | Modifies a snapshot schedule for a cluster. |
delete_snapshot_schedule | delete | ScheduleIdentifier, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
ClusterIdentifier | string | A unique identifier for the cluster whose snapshot schedule you want to modify. |
ScheduleDefinitions | array | An updated list of schedule definitions. A schedule definition is made up of schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)". |
ScheduleIdentifier | string | A unique identifier of the snapshot schedule to delete. |
region | string | AWS region (default: us-east-1) |
ClusterIdentifier | string | The unique identifier for the cluster whose snapshot schedules you want to view. |
DisassociateSchedule | boolean | A boolean to indicate whether to remove the assoiciation between the cluster and the schedule. |
DryRun | boolean | |
Marker | string | A 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. |
MaxRecords | integer | The 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. |
NextInvocations | integer | |
ScheduleDefinitions | array | The definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)". |
ScheduleDescription | string | The description of the snapshot schedule. |
ScheduleIdentifier | string | A unique alphanumeric identifier for the schedule that you want to associate with the cluster. |
TagKeys | array | The key value for a snapshot schedule tag. |
TagValues | array | The value corresponding to the key of the snapshot schedule tag. |
Tags | array | An optional set of tags you can use to search for the schedule. |
SELECT examples
- describe_snapshot_schedules
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_snapshot_schedule
- Manifest
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
;
# Description fields are for documentation purposes
- name: snapshot_schedules
props:
- name: region
value: "{{ region }}"
description: Required parameter for the snapshot_schedules resource.
- name: ScheduleDefinitions
value: "{{ ScheduleDefinitions }}"
description: The definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)".
description: The definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)".
- name: ScheduleIdentifier
value: "{{ ScheduleIdentifier }}"
description: A unique identifier for a snapshot schedule. Only alphanumeric characters are allowed for the identifier.
description: A unique identifier for a snapshot schedule. Only alphanumeric characters are allowed for the identifier.
- name: ScheduleDescription
value: "{{ ScheduleDescription }}"
description: The description of the snapshot schedule.
description: The description of the snapshot schedule.
- name: Tags
value: "{{ Tags }}"
description: An optional set of tags you can use to search for the schedule.
description: An optional set of tags you can use to search for the schedule.
- name: DryRun
value: {{ DryRun }}
- name: NextInvocations
value: {{ NextInvocations }}
UPDATE examples
- modify_snapshot_schedule
- modify_cluster_snapshot_schedule
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;
Modifies a snapshot schedule for a cluster.
UPDATE aws.redshift.snapshot_schedules
SET
-- No updatable properties
WHERE
ClusterIdentifier = '{{ ClusterIdentifier }}' --required
AND region = '{{ region }}' --required
AND ScheduleIdentifier = '{{ ScheduleIdentifier}}'
AND DisassociateSchedule = {{ DisassociateSchedule}};
DELETE examples
- delete_snapshot_schedule
Deletes a snapshot schedule.
DELETE FROM aws.redshift.snapshot_schedules
WHERE ScheduleIdentifier = '{{ ScheduleIdentifier }}' --required
AND region = '{{ region }}' --required
;