amazonka-redshift-2.0: Amazon Redshift SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Redshift.CreateScheduledAction

Description

Creates a scheduled action. A scheduled action contains a schedule and an Amazon Redshift API action. For example, you can create a schedule of when to run the ResizeCluster API operation.

Synopsis

Creating a Request

data CreateScheduledAction Source #

See: newCreateScheduledAction smart constructor.

Constructors

CreateScheduledAction' 

Fields

  • enable :: Maybe Bool

    If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information about state of the scheduled action, see ScheduledAction.

  • endTime :: Maybe ISO8601

    The end time in UTC of the scheduled action. After this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

  • scheduledActionDescription :: Maybe Text

    The description of the scheduled action.

  • startTime :: Maybe ISO8601

    The start time in UTC of the scheduled action. Before this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

  • scheduledActionName :: Text

    The name of the scheduled action. The name must be unique within an account. For more information about this parameter, see ScheduledAction.

  • targetAction :: ScheduledActionType

    A JSON format string of the Amazon Redshift API operation with input parameters. For more information about this parameter, see ScheduledAction.

  • schedule :: Text

    The schedule in at( ) or cron( ) format. For more information about this parameter, see ScheduledAction.

  • iamRole :: Text

    The IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.

Instances

Instances details
ToHeaders CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

ToPath CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

ToQuery CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

AWSRequest CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

Associated Types

type AWSResponse CreateScheduledAction #

Generic CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

Associated Types

type Rep CreateScheduledAction :: Type -> Type #

Read CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

Show CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

NFData CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

Methods

rnf :: CreateScheduledAction -> () #

Eq CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

Hashable CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

type AWSResponse CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

type Rep CreateScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.CreateScheduledAction

type Rep CreateScheduledAction = D1 ('MetaData "CreateScheduledAction" "Amazonka.Redshift.CreateScheduledAction" "amazonka-redshift-2.0-4tocKxBWIuj2GdXa6djdUl" 'False) (C1 ('MetaCons "CreateScheduledAction'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "enable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "endTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601))) :*: (S1 ('MetaSel ('Just "scheduledActionDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "startTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601)))) :*: ((S1 ('MetaSel ('Just "scheduledActionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "targetAction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ScheduledActionType)) :*: (S1 ('MetaSel ('Just "schedule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "iamRole") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCreateScheduledAction Source #

Create a value of CreateScheduledAction with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:enable:CreateScheduledAction', createScheduledAction_enable - If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information about state of the scheduled action, see ScheduledAction.

CreateScheduledAction, createScheduledAction_endTime - The end time in UTC of the scheduled action. After this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

CreateScheduledAction, createScheduledAction_scheduledActionDescription - The description of the scheduled action.

CreateScheduledAction, createScheduledAction_startTime - The start time in UTC of the scheduled action. Before this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

CreateScheduledAction, createScheduledAction_scheduledActionName - The name of the scheduled action. The name must be unique within an account. For more information about this parameter, see ScheduledAction.

CreateScheduledAction, createScheduledAction_targetAction - A JSON format string of the Amazon Redshift API operation with input parameters. For more information about this parameter, see ScheduledAction.

CreateScheduledAction, createScheduledAction_schedule - The schedule in at( ) or cron( ) format. For more information about this parameter, see ScheduledAction.

CreateScheduledAction, createScheduledAction_iamRole - The IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.

Request Lenses

createScheduledAction_enable :: Lens' CreateScheduledAction (Maybe Bool) Source #

If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information about state of the scheduled action, see ScheduledAction.

createScheduledAction_endTime :: Lens' CreateScheduledAction (Maybe UTCTime) Source #

The end time in UTC of the scheduled action. After this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

createScheduledAction_startTime :: Lens' CreateScheduledAction (Maybe UTCTime) Source #

The start time in UTC of the scheduled action. Before this time, the scheduled action does not trigger. For more information about this parameter, see ScheduledAction.

createScheduledAction_scheduledActionName :: Lens' CreateScheduledAction Text Source #

The name of the scheduled action. The name must be unique within an account. For more information about this parameter, see ScheduledAction.

createScheduledAction_targetAction :: Lens' CreateScheduledAction ScheduledActionType Source #

A JSON format string of the Amazon Redshift API operation with input parameters. For more information about this parameter, see ScheduledAction.

createScheduledAction_schedule :: Lens' CreateScheduledAction Text Source #

The schedule in at( ) or cron( ) format. For more information about this parameter, see ScheduledAction.

createScheduledAction_iamRole :: Lens' CreateScheduledAction Text Source #

The IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.

Destructuring the Response

data ScheduledAction Source #

Describes a scheduled action. You can use a scheduled action to trigger some Amazon Redshift API operations on a schedule. For information about which API operations can be scheduled, see ScheduledActionType.

See: newScheduledAction smart constructor.

Constructors

ScheduledAction' 

Fields

  • endTime :: Maybe ISO8601

    The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger.

  • iamRole :: Maybe Text

    The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide.

  • nextInvocations :: Maybe [ISO8601]

    List of times when the scheduled action will run.

  • schedule :: Maybe Text

    The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour.

    Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, "at(2016-03-04T17:27:00)".

    Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year)". For example, "cron(0 10 ? * MON *)". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide.

  • scheduledActionDescription :: Maybe Text

    The description of the scheduled action.

  • scheduledActionName :: Maybe Text

    The name of the scheduled action.

  • startTime :: Maybe ISO8601

    The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger.

  • state :: Maybe ScheduledActionState

    The state of the scheduled action. For example, DISABLED.

  • targetAction :: Maybe ScheduledActionType

    A JSON format string of the Amazon Redshift API operation with input parameters.

    "{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}".

Instances

Instances details
FromXML ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

Generic ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

Associated Types

type Rep ScheduledAction :: Type -> Type #

Read ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

Show ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

NFData ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

Methods

rnf :: ScheduledAction -> () #

Eq ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

Hashable ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

type Rep ScheduledAction Source # 
Instance details

Defined in Amazonka.Redshift.Types.ScheduledAction

newScheduledAction :: ScheduledAction Source #

Create a value of ScheduledAction with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:endTime:ScheduledAction', scheduledAction_endTime - The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger.

$sel:iamRole:ScheduledAction', scheduledAction_iamRole - The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide.

$sel:nextInvocations:ScheduledAction', scheduledAction_nextInvocations - List of times when the scheduled action will run.

$sel:schedule:ScheduledAction', scheduledAction_schedule - The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour.

Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, "at(2016-03-04T17:27:00)".

Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year)". For example, "cron(0 10 ? * MON *)". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide.

$sel:scheduledActionDescription:ScheduledAction', scheduledAction_scheduledActionDescription - The description of the scheduled action.

$sel:scheduledActionName:ScheduledAction', scheduledAction_scheduledActionName - The name of the scheduled action.

$sel:startTime:ScheduledAction', scheduledAction_startTime - The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger.

$sel:state:ScheduledAction', scheduledAction_state - The state of the scheduled action. For example, DISABLED.

$sel:targetAction:ScheduledAction', scheduledAction_targetAction - A JSON format string of the Amazon Redshift API operation with input parameters.

"{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}".

Response Lenses

scheduledAction_endTime :: Lens' ScheduledAction (Maybe UTCTime) Source #

The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger.

scheduledAction_iamRole :: Lens' ScheduledAction (Maybe Text) Source #

The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide.

scheduledAction_nextInvocations :: Lens' ScheduledAction (Maybe [UTCTime]) Source #

List of times when the scheduled action will run.

scheduledAction_schedule :: Lens' ScheduledAction (Maybe Text) Source #

The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour.

Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, "at(2016-03-04T17:27:00)".

Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year)". For example, "cron(0 10 ? * MON *)". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide.

scheduledAction_startTime :: Lens' ScheduledAction (Maybe UTCTime) Source #

The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger.

scheduledAction_state :: Lens' ScheduledAction (Maybe ScheduledActionState) Source #

The state of the scheduled action. For example, DISABLED.

scheduledAction_targetAction :: Lens' ScheduledAction (Maybe ScheduledActionType) Source #

A JSON format string of the Amazon Redshift API operation with input parameters.

"{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}".