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
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnScheduledAction
.static interface
Describes a pause cluster operation.static interface
Describes a resize cluster operation.static interface
Describes a resume cluster operation.static interface
The 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.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnScheduledAction
(Construct scope, String id, CfnScheduledActionProps props) Create a newAWS::Redshift::ScheduledAction
.protected
CfnScheduledAction
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnScheduledAction
(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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
If true, the schedule is enabled.void
setEnable
(IResolvable value) If true, the schedule is enabled.void
setEndTime
(String value) The end time in UTC when the schedule is no longer active.void
setIamRole
(String value) The IAM role to assume to run the scheduled action.void
setSchedule
(String value) The schedule for a one-time (at format) or recurring (cron format) scheduled action.void
The description of the scheduled action.void
setScheduledActionName
(String value) The name of the scheduled action.void
setStartTime
(String value) The start time in UTC when the schedule is active.void
setTargetAction
(IResolvable value) A JSON format string of the Amazon Redshift API operation with input parameters.void
A 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, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in 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:
getCfnProperties
in 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
state
of the scheduled action, seeScheduledAction
. -
setEnable
If true, the schedule is enabled.If false, the scheduled action does not trigger. For more information about
state
of the scheduled action, seeScheduledAction
. -
setEnable
If true, the schedule is enabled.If false, the scheduled action does not trigger. For more information about
state
of 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}}
".
-