interface ScheduledActionProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ApplicationAutoScaling.CfnScalableTarget.ScheduledActionProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling#CfnScalableTarget_ScheduledActionProperty |
Java | software.amazon.awscdk.services.applicationautoscaling.CfnScalableTarget.ScheduledActionProperty |
Python | aws_cdk.aws_applicationautoscaling.CfnScalableTarget.ScheduledActionProperty |
TypeScript | aws-cdk-lib » aws_applicationautoscaling » CfnScalableTarget » ScheduledActionProperty |
ScheduledAction
is a property of the AWS::ApplicationAutoScaling::ScalableTarget resource that specifies a scheduled action for a scalable target.
For more information, see Scheduled scaling in the Application Auto Scaling User Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_applicationautoscaling as appscaling } from 'aws-cdk-lib';
const scheduledActionProperty: appscaling.CfnScalableTarget.ScheduledActionProperty = {
schedule: 'schedule',
scheduledActionName: 'scheduledActionName',
// the properties below are optional
endTime: new Date(),
scalableTargetAction: {
maxCapacity: 123,
minCapacity: 123,
},
startTime: new Date(),
timezone: 'timezone',
};
Properties
Name | Type | Description |
---|---|---|
schedule | string | The schedule for this action. The following formats are supported:. |
scheduled | string | The name of the scheduled action. |
end | IResolvable | date | The date and time that the action is scheduled to end, in UTC. |
scalable | IResolvable | Scalable | The new minimum and maximum capacity. |
start | IResolvable | date | The date and time that the action is scheduled to begin, in UTC. |
timezone? | string | The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression. |
schedule
Type:
string
The schedule for this action. The following formats are supported:.
- At expressions - "
at( *yyyy* - *mm* - *dd* T *hh* : *mm* : *ss* )
" - Rate expressions - "
rate( *value* *unit* )
" - Cron expressions - "
cron( *fields* )
"
At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a regular interval.
At and cron expressions use Universal Coordinated Time (UTC) by default.
The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year].
For rate expressions, value is a positive integer and unit is minute
| minutes
| hour
| hours
| day
| days
.
scheduledActionName
Type:
string
The name of the scheduled action.
This name must be unique among all other scheduled actions on the specified scalable target.
endTime?
Type:
IResolvable
| date
(optional)
The date and time that the action is scheduled to end, in UTC.
scalableTargetAction?
Type:
IResolvable
|
Scalable
(optional)
The new minimum and maximum capacity.
You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
startTime?
Type:
IResolvable
| date
(optional)
The date and time that the action is scheduled to begin, in UTC.
timezone?
Type:
string
(optional)
The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.