Class CfnScheduledAction

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-04T00:39:38.856Z") @Stability(Stable) public class CfnScheduledAction extends CfnResource implements IInspectable
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.redshift.*;
 CfnScheduledAction cfnScheduledAction = CfnScheduledAction.Builder.create(this, "MyCfnScheduledAction")
         .scheduledActionName("scheduledActionName")
         // the properties below are optional
         .enable(false)
         .endTime("endTime")
         .iamRole("iamRole")
         .schedule("schedule")
         .scheduledActionDescription("scheduledActionDescription")
         .startTime("startTime")
         .targetAction(ScheduledActionTypeProperty.builder()
                 .pauseCluster(PauseClusterMessageProperty.builder()
                         .clusterIdentifier("clusterIdentifier")
                         .build())
                 .resizeCluster(ResizeClusterMessageProperty.builder()
                         .clusterIdentifier("clusterIdentifier")
                         // the properties below are optional
                         .classic(false)
                         .clusterType("clusterType")
                         .nodeType("nodeType")
                         .numberOfNodes(123)
                         .build())
                 .resumeCluster(ResumeClusterMessageProperty.builder()
                         .clusterIdentifier("clusterIdentifier")
                         .build())
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnScheduledAction

      protected CfnScheduledAction(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnScheduledAction

      protected CfnScheduledAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnScheduledAction

      @Stability(Stable) public CfnScheduledAction(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnScheduledActionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrNextInvocations

      @Stability(Stable) @NotNull public List<String> getAttrNextInvocations()
      List of times when the scheduled action will run.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The state of the scheduled action.

      For example, DISABLED .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getScheduledActionName

      @Stability(Stable) @NotNull public String getScheduledActionName()
      The name of the scheduled action.
    • setScheduledActionName

      @Stability(Stable) public void setScheduledActionName(@NotNull String value)
      The name of the scheduled action.
    • getEnable

      @Stability(Stable) @Nullable public Object getEnable()
      If true, the schedule is enabled.
    • setEnable

      @Stability(Stable) public void setEnable(@Nullable Boolean value)
      If true, the schedule is enabled.
    • setEnable

      @Stability(Stable) public void setEnable(@Nullable IResolvable value)
      If true, the schedule is enabled.
    • getEndTime

      @Stability(Stable) @Nullable public String getEndTime()
      The end time in UTC when the schedule is no longer active.
    • setEndTime

      @Stability(Stable) public void setEndTime(@Nullable String value)
      The end time in UTC when the schedule is no longer active.
    • getIamRole

      @Stability(Stable) @Nullable public String getIamRole()
      The IAM role to assume to run the scheduled action.
    • setIamRole

      @Stability(Stable) public void setIamRole(@Nullable String value)
      The IAM role to assume to run the scheduled action.
    • getSchedule

      @Stability(Stable) @Nullable public String getSchedule()
      The schedule for a one-time (at format) or recurring (cron format) scheduled action.
    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable String value)
      The schedule for a one-time (at format) or recurring (cron format) scheduled action.
    • getScheduledActionDescription

      @Stability(Stable) @Nullable public String getScheduledActionDescription()
      The description of the scheduled action.
    • setScheduledActionDescription

      @Stability(Stable) public void setScheduledActionDescription(@Nullable String value)
      The description of the scheduled action.
    • getStartTime

      @Stability(Stable) @Nullable public String getStartTime()
      The start time in UTC when the schedule is active.
    • setStartTime

      @Stability(Stable) public void setStartTime(@Nullable String value)
      The start time in UTC when the schedule is active.
    • getTargetAction

      @Stability(Stable) @Nullable public Object getTargetAction()
      A JSON format string of the Amazon Redshift API operation with input parameters.
    • setTargetAction

      @Stability(Stable) public void setTargetAction(@Nullable IResolvable value)
      A JSON format string of the Amazon Redshift API operation with input parameters.
    • setTargetAction

      @Stability(Stable) public void setTargetAction(@Nullable CfnScheduledAction.ScheduledActionTypeProperty value)
      A JSON format string of the Amazon Redshift API operation with input parameters.