create_scheduled_action
¶
create_scheduled_action(
*,
config_overrides: Optional[RedshiftClientConfig] = None,
scheduled_action_name: Optional[String] = None,
target_action: Optional[ScheduledActionType] = None,
schedule: Optional[String] = None,
iam_role: Optional[String] = None,
scheduled_action_description: Optional[String] = None,
start_time: Optional[TStamp] = None,
end_time: Optional[TStamp] = None,
enable: Optional[BooleanOptional] = None,
) -> ScheduledAction
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.
Parameters:
-
scheduled_action_name(Optional[String], default:None) –The name of the scheduled action. The name must be unique within an account. For more information about this parameter, see ScheduledAction.
-
target_action(Optional[ScheduledActionType], default:None) –A JSON format string of the Amazon Redshift API operation with input parameters. For more information about this parameter, see ScheduledAction.
-
schedule(Optional[String], default:None) –The schedule in
at( )orcron( )format. For more information about this parameter, see ScheduledAction. -
iam_role(Optional[String], default:None) –The IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.
-
scheduled_action_description(Optional[String], default:None) –The description of the scheduled action.
-
start_time(Optional[TStamp], default:None) –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.
-
end_time(Optional[TStamp], default:None) –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.
-
enable(Optional[BooleanOptional], default:None) –If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information about
stateof the scheduled action, see ScheduledAction.
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
InvalidScheduledActionFault–The scheduled action is not valid.
-
InvalidScheduleFault–The schedule you submitted isn't valid.
-
ScheduledActionAlreadyExistsFault–The scheduled action already exists.
-
ScheduledActionQuotaExceededFault–The quota for scheduled actions exceeded.
-
ScheduledActionTypeUnsupportedFault–The action type specified for a scheduled action is not supported.
-
UnauthorizedOperation–Your account is not authorized to perform the requested operation.
-
UnsupportedOperationFault–The requested operation isn't supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/redshift.py
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | |