aws_sdk_redshift/client/create_scheduled_action.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateScheduledAction`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`scheduled_action_name(impl Into<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::scheduled_action_name) / [`set_scheduled_action_name(Option<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_scheduled_action_name):<br>required: **true**<br><p>The name of the scheduled action. The name must be unique within an account. For more information about this parameter, see <code>ScheduledAction</code>.</p><br>
7 /// - [`target_action(ScheduledActionType)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::target_action) / [`set_target_action(Option<ScheduledActionType>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_target_action):<br>required: **true**<br><p>A JSON format string of the Amazon Redshift API operation with input parameters. For more information about this parameter, see <code>ScheduledAction</code>.</p><br>
8 /// - [`schedule(impl Into<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::schedule) / [`set_schedule(Option<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_schedule):<br>required: **true**<br><p>The schedule in <code>at( )</code> or <code>cron( )</code> format. For more information about this parameter, see <code>ScheduledAction</code>.</p><br>
9 /// - [`iam_role(impl Into<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::iam_role) / [`set_iam_role(Option<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_iam_role):<br>required: **true**<br><p>The IAM role to assume to run the target action. For more information about this parameter, see <code>ScheduledAction</code>.</p><br>
10 /// - [`scheduled_action_description(impl Into<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::scheduled_action_description) / [`set_scheduled_action_description(Option<String>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_scheduled_action_description):<br>required: **false**<br><p>The description of the scheduled action.</p><br>
11 /// - [`start_time(DateTime)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::start_time) / [`set_start_time(Option<DateTime>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_start_time):<br>required: **false**<br><p>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 <code>ScheduledAction</code>.</p><br>
12 /// - [`end_time(DateTime)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::end_time) / [`set_end_time(Option<DateTime>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_end_time):<br>required: **false**<br><p>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 <code>ScheduledAction</code>.</p><br>
13 /// - [`enable(bool)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::enable) / [`set_enable(Option<bool>)`](crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::set_enable):<br>required: **false**<br><p>If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information about <code>state</code> of the scheduled action, see <code>ScheduledAction</code>.</p><br>
14 /// - On success, responds with [`CreateScheduledActionOutput`](crate::operation::create_scheduled_action::CreateScheduledActionOutput) with field(s):
15 /// - [`scheduled_action_name(Option<String>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::scheduled_action_name): <p>The name of the scheduled action.</p>
16 /// - [`target_action(Option<ScheduledActionType>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::target_action): <p>A JSON format string of the Amazon Redshift API operation with input parameters.</p> <p>"<code>{\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}</code>".</p>
17 /// - [`schedule(Option<String>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::schedule): <p>The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour.</p> <p>Format of at expressions is "<code>at(yyyy-mm-ddThh:mm:ss)</code>". For example, "<code>at(2016-03-04T17:27:00)</code>".</p> <p>Format of cron expressions is "<code>cron(Minutes Hours Day-of-month Month Day-of-week Year)</code>". For example, "<code>cron(0 10 ? * MON *)</code>". For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions">Cron Expressions</a> in the <i>Amazon CloudWatch Events User Guide</i>.</p>
18 /// - [`iam_role(Option<String>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::iam_role): <p>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 <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html">Using Identity-Based Policies for Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
19 /// - [`scheduled_action_description(Option<String>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::scheduled_action_description): <p>The description of the scheduled action.</p>
20 /// - [`state(Option<ScheduledActionState>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::state): <p>The state of the scheduled action. For example, <code>DISABLED</code>.</p>
21 /// - [`next_invocations(Option<Vec::<DateTime>>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::next_invocations): <p>List of times when the scheduled action will run.</p>
22 /// - [`start_time(Option<DateTime>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::start_time): <p>The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger.</p>
23 /// - [`end_time(Option<DateTime>)`](crate::operation::create_scheduled_action::CreateScheduledActionOutput::end_time): <p>The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger.</p>
24 /// - On failure, responds with [`SdkError<CreateScheduledActionError>`](crate::operation::create_scheduled_action::CreateScheduledActionError)
25 pub fn create_scheduled_action(&self) -> crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder {
26 crate::operation::create_scheduled_action::builders::CreateScheduledActionFluentBuilder::new(self.handle.clone())
27 }
28}