ModifyScheduledAction - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

ModifyScheduledAction

Modifies a scheduled action.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ScheduledActionName

The name of the scheduled action to modify.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

Enable

A modified enable flag of the scheduled action. If true, the scheduled action is active. If false, the scheduled action is disabled.

Type: Boolean

Required: No

EndTime

A modified end time of the scheduled action. For more information about this parameter, see ScheduledAction.

Type: Timestamp

Required: No

IamRole

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

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

Schedule

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

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

ScheduledActionDescription

A modified description of the scheduled action.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

StartTime

A modified start time of the scheduled action. For more information about this parameter, see ScheduledAction.

Type: Timestamp

Required: No

TargetAction

A modified JSON format of the scheduled action. For more information about this parameter, see ScheduledAction.

Type: ScheduledActionType object

Required: No

Response Elements

The following elements are returned by the service.

EndTime

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

Type: Timestamp

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.

Type: String

Length Constraints: Maximum length of 2147483647.

NextInvocations.ScheduledActionTime.N

List of times when the scheduled action will run.

Type: Array of timestamps

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.

Type: String

Length Constraints: Maximum length of 2147483647.

ScheduledActionDescription

The description of the scheduled action.

Type: String

Length Constraints: Maximum length of 2147483647.

ScheduledActionName

The name of the scheduled action.

Type: String

Length Constraints: Maximum length of 2147483647.

StartTime

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

Type: Timestamp

State

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

Type: String

Valid Values: ACTIVE | DISABLED

TargetAction

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

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

Type: ScheduledActionType object

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidSchedule

The schedule you submitted isn't valid.

HTTP Status Code: 400

InvalidScheduledAction

The scheduled action is not valid.

HTTP Status Code: 400

ScheduledActionNotFound

The scheduled action cannot be found.

HTTP Status Code: 400

ScheduledActionTypeUnsupported

The action type specified for a scheduled action is not supported.

HTTP Status Code: 400

UnauthorizedOperation

Your account is not authorized to perform the requested operation.

HTTP Status Code: 400

Examples

Example

This example adds description to an existing scheduled action.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=ModifyScheduledAction &ScheduledActionName=myscheduledaction &ScheduledActionDescription=My+scheduled+action &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20190817/us-east-2/redshift/aws4_request &X-Amz-Date=20190825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<ModifyScheduledActionResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <ModifyScheduledActionResult> <IamRole>arn:aws:iam::123456789012:role/myRedshiftRole</IamRole> <Schedule>at(2019-12-31T00:00:00)</Schedule> <ScheduledActionName>myscheduledaction</ScheduledActionName> <TargetAction> <ResizeCluster> <ClusterType>multi-node</ClusterType> <ClusterIdentifier>mycluster</ClusterIdentifier> <Classic>true</Classic> <NumberOfNodes>3</NumberOfNodes> <NodeType>dc2.large</NodeType> </ResizeCluster> </TargetAction> <NextInvocations> <ScheduledActionTime>2019-12-31T00:00:00Z</ScheduledActionTime> </NextInvocations> <State>ACTIVE</State> <ScheduledActionDescription>My scheduled action</ScheduledActionDescription> </ModifyScheduledActionResult> <ResponseMetadata> <RequestId>a2388ba8-28f3-11ea-8a28-2fd1719d0e86</RequestId> </ResponseMetadata> </ModifyScheduledActionResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: