Class CfnScheduledAction
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Redshift::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.
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnScheduledAction.static interfaceDescribes a pause cluster operation.static interfaceDescribes a resize cluster operation.static interfaceDescribes a resume cluster operation.static interfaceThe action type that specifies an Amazon Redshift API operation that is supported by the Amazon Redshift scheduler.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnScheduledAction(Construct scope, String id, CfnScheduledActionProps props) Create a newAWS::Redshift::ScheduledAction.protectedCfnScheduledAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnScheduledAction(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionList of times when the scheduled action will run.The state of the scheduled action.If true, the schedule is enabled.The end time in UTC when the schedule is no longer active.The IAM role to assume to run the scheduled action.The schedule for a one-time (at format) or recurring (cron format) scheduled action.The description of the scheduled action.The name of the scheduled action.The start time in UTC when the schedule is active.A JSON format string of the Amazon Redshift API operation with input parameters.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidIf true, the schedule is enabled.voidsetEnable(IResolvable value) If true, the schedule is enabled.voidsetEndTime(String value) The end time in UTC when the schedule is no longer active.voidsetIamRole(String value) The IAM role to assume to run the scheduled action.voidsetSchedule(String value) The schedule for a one-time (at format) or recurring (cron format) scheduled action.voidThe description of the scheduled action.voidsetScheduledActionName(String value) The name of the scheduled action.voidsetStartTime(String value) The start time in UTC when the schedule is active.voidsetTargetAction(IResolvable value) A JSON format string of the Amazon Redshift API operation with input parameters.voidA JSON format string of the Amazon Redshift API operation with input parameters.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 Construct scope, @NotNull String id, @NotNull CfnScheduledActionProps props) Create a newAWS::Redshift::ScheduledAction.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrNextInvocations
List of times when the scheduled action will run. -
getAttrState
The state of the scheduled action.For example,
DISABLED. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getScheduledActionName
The name of the scheduled action. -
setScheduledActionName
The name of the scheduled action. -
getEnable
If true, the schedule is enabled.If false, the scheduled action does not trigger. For more information about
stateof the scheduled action, seeScheduledAction. -
setEnable
If true, the schedule is enabled.If false, the scheduled action does not trigger. For more information about
stateof the scheduled action, seeScheduledAction. -
setEnable
If true, the schedule is enabled.If false, the scheduled action does not trigger. For more information about
stateof the scheduled action, seeScheduledAction. -
getEndTime
The end time in UTC when the schedule is no longer active.After this time, the scheduled action does not trigger.
-
setEndTime
The end time in UTC when the schedule is no longer active.After this time, the scheduled action does not trigger.
-
getIamRole
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 .
-
setIamRole
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 .
-
getSchedule
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 . -
setSchedule
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 . -
getScheduledActionDescription
The description of the scheduled action. -
setScheduledActionDescription
The description of the scheduled action. -
getStartTime
The start time in UTC when the schedule is active.Before this time, the scheduled action does not trigger.
-
setStartTime
The start time in UTC when the schedule is active.Before this time, the scheduled action does not trigger.
-
getTargetAction
A JSON format string of the Amazon Redshift API operation with input parameters."
{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}". -
setTargetAction
A JSON format string of the Amazon Redshift API operation with input parameters."
{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}". -
setTargetAction
@Stability(Stable) public void setTargetAction(@Nullable CfnScheduledAction.ScheduledActionTypeProperty value) A JSON format string of the Amazon Redshift API operation with input parameters."
{\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}".
-