/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace Redshift { namespace Model { /** *

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 * Also:

AWS * API Reference

*/ class ScheduledAction { public: AWS_REDSHIFT_API ScheduledAction(); AWS_REDSHIFT_API ScheduledAction(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_REDSHIFT_API ScheduledAction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_REDSHIFT_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_REDSHIFT_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the scheduled action.

*/ inline const Aws::String& GetScheduledActionName() const{ return m_scheduledActionName; } /** *

The name of the scheduled action.

*/ inline bool ScheduledActionNameHasBeenSet() const { return m_scheduledActionNameHasBeenSet; } /** *

The name of the scheduled action.

*/ inline void SetScheduledActionName(const Aws::String& value) { m_scheduledActionNameHasBeenSet = true; m_scheduledActionName = value; } /** *

The name of the scheduled action.

*/ inline void SetScheduledActionName(Aws::String&& value) { m_scheduledActionNameHasBeenSet = true; m_scheduledActionName = std::move(value); } /** *

The name of the scheduled action.

*/ inline void SetScheduledActionName(const char* value) { m_scheduledActionNameHasBeenSet = true; m_scheduledActionName.assign(value); } /** *

The name of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionName(const Aws::String& value) { SetScheduledActionName(value); return *this;} /** *

The name of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionName(Aws::String&& value) { SetScheduledActionName(std::move(value)); return *this;} /** *

The name of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionName(const char* value) { SetScheduledActionName(value); return *this;} /** *

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

*

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

*/ inline const ScheduledActionType& GetTargetAction() const{ return m_targetAction; } /** *

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

*

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

*/ inline bool TargetActionHasBeenSet() const { return m_targetActionHasBeenSet; } /** *

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

*

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

*/ inline void SetTargetAction(const ScheduledActionType& value) { m_targetActionHasBeenSet = true; m_targetAction = value; } /** *

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

*

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

*/ inline void SetTargetAction(ScheduledActionType&& value) { m_targetActionHasBeenSet = true; m_targetAction = std::move(value); } /** *

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

*

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

*/ inline ScheduledAction& WithTargetAction(const ScheduledActionType& value) { SetTargetAction(value); return *this;} /** *

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

*

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

*/ inline ScheduledAction& WithTargetAction(ScheduledActionType&& value) { SetTargetAction(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetSchedule() const{ return m_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.

*/ inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; } /** *

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.

*/ inline void SetSchedule(const Aws::String& value) { m_scheduleHasBeenSet = true; m_schedule = value; } /** *

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.

*/ inline void SetSchedule(Aws::String&& value) { m_scheduleHasBeenSet = true; m_schedule = std::move(value); } /** *

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.

*/ inline void SetSchedule(const char* value) { m_scheduleHasBeenSet = true; m_schedule.assign(value); } /** *

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.

*/ inline ScheduledAction& WithSchedule(const Aws::String& value) { SetSchedule(value); return *this;} /** *

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.

*/ inline ScheduledAction& WithSchedule(Aws::String&& value) { SetSchedule(std::move(value)); return *this;} /** *

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.

*/ inline ScheduledAction& WithSchedule(const char* value) { SetSchedule(value); return *this;} /** *

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.

*/ inline const Aws::String& GetIamRole() const{ return m_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.

*/ inline bool IamRoleHasBeenSet() const { return m_iamRoleHasBeenSet; } /** *

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.

*/ inline void SetIamRole(const Aws::String& value) { m_iamRoleHasBeenSet = true; m_iamRole = value; } /** *

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.

*/ inline void SetIamRole(Aws::String&& value) { m_iamRoleHasBeenSet = true; m_iamRole = std::move(value); } /** *

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.

*/ inline void SetIamRole(const char* value) { m_iamRoleHasBeenSet = true; m_iamRole.assign(value); } /** *

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.

*/ inline ScheduledAction& WithIamRole(const Aws::String& value) { SetIamRole(value); return *this;} /** *

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.

*/ inline ScheduledAction& WithIamRole(Aws::String&& value) { SetIamRole(std::move(value)); return *this;} /** *

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.

*/ inline ScheduledAction& WithIamRole(const char* value) { SetIamRole(value); return *this;} /** *

The description of the scheduled action.

*/ inline const Aws::String& GetScheduledActionDescription() const{ return m_scheduledActionDescription; } /** *

The description of the scheduled action.

*/ inline bool ScheduledActionDescriptionHasBeenSet() const { return m_scheduledActionDescriptionHasBeenSet; } /** *

The description of the scheduled action.

*/ inline void SetScheduledActionDescription(const Aws::String& value) { m_scheduledActionDescriptionHasBeenSet = true; m_scheduledActionDescription = value; } /** *

The description of the scheduled action.

*/ inline void SetScheduledActionDescription(Aws::String&& value) { m_scheduledActionDescriptionHasBeenSet = true; m_scheduledActionDescription = std::move(value); } /** *

The description of the scheduled action.

*/ inline void SetScheduledActionDescription(const char* value) { m_scheduledActionDescriptionHasBeenSet = true; m_scheduledActionDescription.assign(value); } /** *

The description of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionDescription(const Aws::String& value) { SetScheduledActionDescription(value); return *this;} /** *

The description of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionDescription(Aws::String&& value) { SetScheduledActionDescription(std::move(value)); return *this;} /** *

The description of the scheduled action.

*/ inline ScheduledAction& WithScheduledActionDescription(const char* value) { SetScheduledActionDescription(value); return *this;} /** *

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

*/ inline const ScheduledActionState& GetState() const{ return m_state; } /** *

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

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

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

*/ inline void SetState(const ScheduledActionState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

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

*/ inline void SetState(ScheduledActionState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

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

*/ inline ScheduledAction& WithState(const ScheduledActionState& value) { SetState(value); return *this;} /** *

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

*/ inline ScheduledAction& WithState(ScheduledActionState&& value) { SetState(std::move(value)); return *this;} /** *

List of times when the scheduled action will run.

*/ inline const Aws::Vector& GetNextInvocations() const{ return m_nextInvocations; } /** *

List of times when the scheduled action will run.

*/ inline bool NextInvocationsHasBeenSet() const { return m_nextInvocationsHasBeenSet; } /** *

List of times when the scheduled action will run.

*/ inline void SetNextInvocations(const Aws::Vector& value) { m_nextInvocationsHasBeenSet = true; m_nextInvocations = value; } /** *

List of times when the scheduled action will run.

*/ inline void SetNextInvocations(Aws::Vector&& value) { m_nextInvocationsHasBeenSet = true; m_nextInvocations = std::move(value); } /** *

List of times when the scheduled action will run.

*/ inline ScheduledAction& WithNextInvocations(const Aws::Vector& value) { SetNextInvocations(value); return *this;} /** *

List of times when the scheduled action will run.

*/ inline ScheduledAction& WithNextInvocations(Aws::Vector&& value) { SetNextInvocations(std::move(value)); return *this;} /** *

List of times when the scheduled action will run.

*/ inline ScheduledAction& AddNextInvocations(const Aws::Utils::DateTime& value) { m_nextInvocationsHasBeenSet = true; m_nextInvocations.push_back(value); return *this; } /** *

List of times when the scheduled action will run.

*/ inline ScheduledAction& AddNextInvocations(Aws::Utils::DateTime&& value) { m_nextInvocationsHasBeenSet = true; m_nextInvocations.push_back(std::move(value)); return *this; } /** *

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

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

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

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

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

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

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

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

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

*/ inline ScheduledAction& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

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

*/ inline ScheduledAction& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

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

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } /** *

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

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

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

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

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

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

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

*/ inline ScheduledAction& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} /** *

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

*/ inline ScheduledAction& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline ScheduledAction& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline ScheduledAction& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::String m_scheduledActionName; bool m_scheduledActionNameHasBeenSet = false; ScheduledActionType m_targetAction; bool m_targetActionHasBeenSet = false; Aws::String m_schedule; bool m_scheduleHasBeenSet = false; Aws::String m_iamRole; bool m_iamRoleHasBeenSet = false; Aws::String m_scheduledActionDescription; bool m_scheduledActionDescriptionHasBeenSet = false; ScheduledActionState m_state; bool m_stateHasBeenSet = false; Aws::Vector m_nextInvocations; bool m_nextInvocationsHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace Redshift } // namespace Aws