Class CfnScheduledActionProps.Builder
java.lang.Object
software.amazon.awscdk.services.redshift.CfnScheduledActionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScheduledActionProps>
- Enclosing interface:
CfnScheduledActionProps
@Stability(Stable)
public static final class CfnScheduledActionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScheduledActionProps>
A builder for
CfnScheduledActionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnScheduledActionProps.getEnable()
enable
(IResolvable enable) Sets the value ofCfnScheduledActionProps.getEnable()
Sets the value ofCfnScheduledActionProps.getEndTime()
Sets the value ofCfnScheduledActionProps.getIamRole()
Sets the value ofCfnScheduledActionProps.getSchedule()
scheduledActionDescription
(String scheduledActionDescription) Sets the value ofCfnScheduledActionProps.getScheduledActionDescription()
scheduledActionName
(String scheduledActionName) Sets the value ofCfnScheduledActionProps.getScheduledActionName()
Sets the value ofCfnScheduledActionProps.getStartTime()
targetAction
(IResolvable targetAction) Sets the value ofCfnScheduledActionProps.getTargetAction()
targetAction
(CfnScheduledAction.ScheduledActionTypeProperty targetAction) Sets the value ofCfnScheduledActionProps.getTargetAction()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
scheduledActionName
@Stability(Stable) public CfnScheduledActionProps.Builder scheduledActionName(String scheduledActionName) Sets the value ofCfnScheduledActionProps.getScheduledActionName()
- Parameters:
scheduledActionName
- The name of the scheduled action. This parameter is required.- Returns:
this
-
enable
Sets the value ofCfnScheduledActionProps.getEnable()
- Parameters:
enable
- If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information aboutstate
of the scheduled action, seeScheduledAction
.- Returns:
this
-
enable
Sets the value ofCfnScheduledActionProps.getEnable()
- Parameters:
enable
- If true, the schedule is enabled. If false, the scheduled action does not trigger. For more information aboutstate
of the scheduled action, seeScheduledAction
.- Returns:
this
-
endTime
Sets the value ofCfnScheduledActionProps.getEndTime()
- Parameters:
endTime
- The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger.- Returns:
this
-
iamRole
Sets the value ofCfnScheduledActionProps.getIamRole()
- Parameters:
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 .- Returns:
this
-
schedule
Sets the value ofCfnScheduledActionProps.getSchedule()
- Parameters:
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 .- Returns:
this
-
scheduledActionDescription
@Stability(Stable) public CfnScheduledActionProps.Builder scheduledActionDescription(String scheduledActionDescription) Sets the value ofCfnScheduledActionProps.getScheduledActionDescription()
- Parameters:
scheduledActionDescription
- The description of the scheduled action.- Returns:
this
-
startTime
Sets the value ofCfnScheduledActionProps.getStartTime()
- Parameters:
startTime
- The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger.- Returns:
this
-
targetAction
Sets the value ofCfnScheduledActionProps.getTargetAction()
- Parameters:
targetAction
- A JSON format string of the Amazon Redshift API operation with input parameters. "{\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}
".- Returns:
this
-
targetAction
@Stability(Stable) public CfnScheduledActionProps.Builder targetAction(CfnScheduledAction.ScheduledActionTypeProperty targetAction) Sets the value ofCfnScheduledActionProps.getTargetAction()
- Parameters:
targetAction
- A JSON format string of the Amazon Redshift API operation with input parameters. "{\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}
".- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScheduledActionProps>
- Returns:
- a new instance of
CfnScheduledActionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-