Amazon Redshift

2019/01/09 - Amazon Redshift - 3 updated api methods

Changes  DescribeSnapshotSchedules returns a list of snapshot schedules. With this release, this API will have a list of clusters and number of clusters associated with the schedule.

CreateSnapshotSchedule (updated) Link ¶
Changes (response)
{'AssociatedClusterCount': 'integer',
 'AssociatedClusters': [{'ClusterIdentifier': 'string',
                         'ScheduleAssociationState': 'MODIFYING | ACTIVE | '
                                                     'FAILED'}]}

Creates a new snapshot schedule.

See also: AWS API Documentation

Request Syntax

client.create_snapshot_schedule(
    ScheduleDefinitions=[
        'string',
    ],
    ScheduleIdentifier='string',
    ScheduleDescription='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    DryRun=True|False,
    NextInvocations=123
)
type ScheduleDefinitions

list

param ScheduleDefinitions

The definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)".

  • (string) --

type ScheduleIdentifier

string

param ScheduleIdentifier

A unique identifier for a snapshot schedule. Only alphanumeric characters are allowed for the identifier.

type ScheduleDescription

string

param ScheduleDescription

The description of the snapshot schedule.

type Tags

list

param Tags
  • (dict) --

    A tag consisting of a name/value pair for a resource.

    • Key (string) --

      The key, or name, for the resource tag.

    • Value (string) --

      The value for the resource tag.

type DryRun

boolean

param DryRun

type NextInvocations

integer

param NextInvocations

rtype

dict

returns

Response Syntax

{
    'ScheduleDefinitions': [
        'string',
    ],
    'ScheduleIdentifier': 'string',
    'ScheduleDescription': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextInvocations': [
        datetime(2015, 1, 1),
    ],
    'AssociatedClusterCount': 123,
    'AssociatedClusters': [
        {
            'ClusterIdentifier': 'string',
            'ScheduleAssociationState': 'MODIFYING'|'ACTIVE'|'FAILED'
        },
    ]
}

Response Structure

  • (dict) --

    Describes a snapshot schedule. You can set a regular interval for creating snapshots of a cluster. You can also schedule snapshots for specific dates.

    • ScheduleDefinitions (list) --

      A list of ScheduleDefinitions

      • (string) --

    • ScheduleIdentifier (string) --

      A unique identifier for the schedule.

    • ScheduleDescription (string) --

      The description of the schedule.

    • Tags (list) --

      An optional set of tags describing the schedule.

      • (dict) --

        A tag consisting of a name/value pair for a resource.

        • Key (string) --

          The key, or name, for the resource tag.

        • Value (string) --

          The value for the resource tag.

    • NextInvocations (list) --

      • (datetime) --

    • AssociatedClusterCount (integer) --

    • AssociatedClusters (list) --

      • (dict) --

        • ClusterIdentifier (string) --

        • ScheduleAssociationState (string) --

DescribeSnapshotSchedules (updated) Link ¶
Changes (response)
{'SnapshotSchedules': {'AssociatedClusterCount': 'integer',
                       'AssociatedClusters': [{'ClusterIdentifier': 'string',
                                               'ScheduleAssociationState': 'MODIFYING '
                                                                           '| '
                                                                           'ACTIVE '
                                                                           '| '
                                                                           'FAILED'}]}}

Returns a list of snapshot schedules.

See also: AWS API Documentation

Request Syntax

client.describe_snapshot_schedules(
    ClusterIdentifier='string',
    ScheduleIdentifier='string',
    TagKeys=[
        'string',
    ],
    TagValues=[
        'string',
    ],
    Marker='string',
    MaxRecords=123
)
type ClusterIdentifier

string

param ClusterIdentifier

The unique identifier for the cluster whose snapshot schedules you want to view.

type ScheduleIdentifier

string

param ScheduleIdentifier

A unique identifier for a snapshot schedule.

type TagKeys

list

param TagKeys

The key value for a snapshot schedule tag.

  • (string) --

type TagValues

list

param TagValues

The value corresponding to the key of the snapshot schedule tag.

  • (string) --

type Marker

string

param Marker

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.

type MaxRecords

integer

param MaxRecords

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.

rtype

dict

returns

Response Syntax

{
    'SnapshotSchedules': [
        {
            'ScheduleDefinitions': [
                'string',
            ],
            'ScheduleIdentifier': 'string',
            'ScheduleDescription': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'NextInvocations': [
                datetime(2015, 1, 1),
            ],
            'AssociatedClusterCount': 123,
            'AssociatedClusters': [
                {
                    'ClusterIdentifier': 'string',
                    'ScheduleAssociationState': 'MODIFYING'|'ACTIVE'|'FAILED'
                },
            ]
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • SnapshotSchedules (list) --

      A list of SnapshotSchedules.

      • (dict) --

        Describes a snapshot schedule. You can set a regular interval for creating snapshots of a cluster. You can also schedule snapshots for specific dates.

        • ScheduleDefinitions (list) --

          A list of ScheduleDefinitions

          • (string) --

        • ScheduleIdentifier (string) --

          A unique identifier for the schedule.

        • ScheduleDescription (string) --

          The description of the schedule.

        • Tags (list) --

          An optional set of tags describing the schedule.

          • (dict) --

            A tag consisting of a name/value pair for a resource.

            • Key (string) --

              The key, or name, for the resource tag.

            • Value (string) --

              The value for the resource tag.

        • NextInvocations (list) --

          • (datetime) --

        • AssociatedClusterCount (integer) --

        • AssociatedClusters (list) --

          • (dict) --

            • ClusterIdentifier (string) --

            • ScheduleAssociationState (string) --

    • 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.

ModifySnapshotSchedule (updated) Link ¶
Changes (response)
{'AssociatedClusterCount': 'integer',
 'AssociatedClusters': [{'ClusterIdentifier': 'string',
                         'ScheduleAssociationState': 'MODIFYING | ACTIVE | '
                                                     'FAILED'}]}

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

See also: AWS API Documentation

Request Syntax

client.modify_snapshot_schedule(
    ScheduleIdentifier='string',
    ScheduleDefinitions=[
        'string',
    ]
)
type ScheduleIdentifier

string

param ScheduleIdentifier

[REQUIRED]

A unique alphanumeric identifier of the schedule to modify.

type ScheduleDefinitions

list

param ScheduleDefinitions

[REQUIRED]

An updated list of schedule definitions. A schedule definition is made up of schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)".

  • (string) --

rtype

dict

returns

Response Syntax

{
    'ScheduleDefinitions': [
        'string',
    ],
    'ScheduleIdentifier': 'string',
    'ScheduleDescription': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextInvocations': [
        datetime(2015, 1, 1),
    ],
    'AssociatedClusterCount': 123,
    'AssociatedClusters': [
        {
            'ClusterIdentifier': 'string',
            'ScheduleAssociationState': 'MODIFYING'|'ACTIVE'|'FAILED'
        },
    ]
}

Response Structure

  • (dict) --

    Describes a snapshot schedule. You can set a regular interval for creating snapshots of a cluster. You can also schedule snapshots for specific dates.

    • ScheduleDefinitions (list) --

      A list of ScheduleDefinitions

      • (string) --

    • ScheduleIdentifier (string) --

      A unique identifier for the schedule.

    • ScheduleDescription (string) --

      The description of the schedule.

    • Tags (list) --

      An optional set of tags describing the schedule.

      • (dict) --

        A tag consisting of a name/value pair for a resource.

        • Key (string) --

          The key, or name, for the resource tag.

        • Value (string) --

          The value for the resource tag.

    • NextInvocations (list) --

      • (datetime) --

    • AssociatedClusterCount (integer) --

    • AssociatedClusters (list) --

      • (dict) --

        • ClusterIdentifier (string) --

        • ScheduleAssociationState (string) --