Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates the specified schedule.
Synopsis
- data CreateSchedule = CreateSchedule' {
- clientToken :: Maybe Text
- description :: Maybe Text
- endDate :: Maybe POSIX
- groupName :: Maybe Text
- kmsKeyArn :: Maybe Text
- scheduleExpressionTimezone :: Maybe Text
- startDate :: Maybe POSIX
- state :: Maybe ScheduleState
- flexibleTimeWindow :: FlexibleTimeWindow
- name :: Text
- scheduleExpression :: Text
- target :: Target
- newCreateSchedule :: FlexibleTimeWindow -> Text -> Text -> Target -> CreateSchedule
- createSchedule_clientToken :: Lens' CreateSchedule (Maybe Text)
- createSchedule_description :: Lens' CreateSchedule (Maybe Text)
- createSchedule_endDate :: Lens' CreateSchedule (Maybe UTCTime)
- createSchedule_groupName :: Lens' CreateSchedule (Maybe Text)
- createSchedule_kmsKeyArn :: Lens' CreateSchedule (Maybe Text)
- createSchedule_scheduleExpressionTimezone :: Lens' CreateSchedule (Maybe Text)
- createSchedule_startDate :: Lens' CreateSchedule (Maybe UTCTime)
- createSchedule_state :: Lens' CreateSchedule (Maybe ScheduleState)
- createSchedule_flexibleTimeWindow :: Lens' CreateSchedule FlexibleTimeWindow
- createSchedule_name :: Lens' CreateSchedule Text
- createSchedule_scheduleExpression :: Lens' CreateSchedule Text
- createSchedule_target :: Lens' CreateSchedule Target
- data CreateScheduleResponse = CreateScheduleResponse' {
- httpStatus :: Int
- scheduleArn :: Text
- newCreateScheduleResponse :: Int -> Text -> CreateScheduleResponse
- createScheduleResponse_httpStatus :: Lens' CreateScheduleResponse Int
- createScheduleResponse_scheduleArn :: Lens' CreateScheduleResponse Text
Creating a Request
data CreateSchedule Source #
See: newCreateSchedule
smart constructor.
CreateSchedule' | |
|
Instances
:: FlexibleTimeWindow | |
-> Text | |
-> Text | |
-> Target | |
-> CreateSchedule |
Create a value of CreateSchedule
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:CreateSchedule'
, createSchedule_clientToken
- Unique, case-sensitive identifier you provide to ensure the idempotency
of the request. If you do not specify a client token, EventBridge
Scheduler uses a randomly generated token for the request to ensure
idempotency.
$sel:description:CreateSchedule'
, createSchedule_description
- The description you specify for the schedule.
$sel:endDate:CreateSchedule'
, createSchedule_endDate
- The date, in UTC, before which the schedule can invoke its target.
Depending on the schedule's recurrence expression, invocations might
stop on, or before, the EndDate
you specify. EventBridge Scheduler
ignores EndDate
for one-time schedules.
CreateSchedule
, createSchedule_groupName
- The name of the schedule group to associate with this schedule. If you
omit this, the default schedule group is used.
$sel:kmsKeyArn:CreateSchedule'
, createSchedule_kmsKeyArn
- The Amazon Resource Name (ARN) for the customer managed KMS key that
EventBridge Scheduler will use to encrypt and decrypt your data.
$sel:scheduleExpressionTimezone:CreateSchedule'
, createSchedule_scheduleExpressionTimezone
- The timezone in which the scheduling expression is evaluated.
$sel:startDate:CreateSchedule'
, createSchedule_startDate
- The date, in UTC, after which the schedule can begin invoking its
target. Depending on the schedule's recurrence expression, invocations
might occur on, or after, the StartDate
you specify. EventBridge
Scheduler ignores StartDate
for one-time schedules.
CreateSchedule
, createSchedule_state
- Specifies whether the schedule is enabled or disabled.
$sel:flexibleTimeWindow:CreateSchedule'
, createSchedule_flexibleTimeWindow
- Allows you to configure a time window during which EventBridge Scheduler
invokes the schedule.
CreateSchedule
, createSchedule_name
- The name of the schedule that you are creating.
$sel:scheduleExpression:CreateSchedule'
, createSchedule_scheduleExpression
- The expression that defines when the schedule runs. The following
formats are supported.
at
expression -at(yyyy-mm-ddThh:mm:ss)
rate
expression -rate(unit value)
cron
expression -cron(fields)
You can use at
expressions to create one-time schedules that invoke a
target once, at the time and in the time zone, that you specify. You can
use rate
and cron
expressions to create recurring schedules.
Rate-based schedules are useful when you want to invoke a target at
regular intervals, such as every 15 minutes or every five days.
Cron-based schedules are useful when you want to invoke a target
periodically at a specific time, such as at 8:00 am (UTC+0) every 1st
day of the month.
A cron
expression consists of six fields separated by white spaces:
(minutes hours day_of_month month day_of_week year)
.
A rate
expression consists of a value as a positive integer, and a
unit with the following options: minute
| minutes
| hour
|
hours
| day
| days
For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide.
CreateSchedule
, createSchedule_target
- The schedule's target.
Request Lenses
createSchedule_clientToken :: Lens' CreateSchedule (Maybe Text) Source #
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.
createSchedule_description :: Lens' CreateSchedule (Maybe Text) Source #
The description you specify for the schedule.
createSchedule_endDate :: Lens' CreateSchedule (Maybe UTCTime) Source #
The date, in UTC, before which the schedule can invoke its target.
Depending on the schedule's recurrence expression, invocations might
stop on, or before, the EndDate
you specify. EventBridge Scheduler
ignores EndDate
for one-time schedules.
createSchedule_groupName :: Lens' CreateSchedule (Maybe Text) Source #
The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
createSchedule_kmsKeyArn :: Lens' CreateSchedule (Maybe Text) Source #
The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
createSchedule_scheduleExpressionTimezone :: Lens' CreateSchedule (Maybe Text) Source #
The timezone in which the scheduling expression is evaluated.
createSchedule_startDate :: Lens' CreateSchedule (Maybe UTCTime) Source #
The date, in UTC, after which the schedule can begin invoking its
target. Depending on the schedule's recurrence expression, invocations
might occur on, or after, the StartDate
you specify. EventBridge
Scheduler ignores StartDate
for one-time schedules.
createSchedule_state :: Lens' CreateSchedule (Maybe ScheduleState) Source #
Specifies whether the schedule is enabled or disabled.
createSchedule_flexibleTimeWindow :: Lens' CreateSchedule FlexibleTimeWindow Source #
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
createSchedule_name :: Lens' CreateSchedule Text Source #
The name of the schedule that you are creating.
createSchedule_scheduleExpression :: Lens' CreateSchedule Text Source #
The expression that defines when the schedule runs. The following formats are supported.
at
expression -at(yyyy-mm-ddThh:mm:ss)
rate
expression -rate(unit value)
cron
expression -cron(fields)
You can use at
expressions to create one-time schedules that invoke a
target once, at the time and in the time zone, that you specify. You can
use rate
and cron
expressions to create recurring schedules.
Rate-based schedules are useful when you want to invoke a target at
regular intervals, such as every 15 minutes or every five days.
Cron-based schedules are useful when you want to invoke a target
periodically at a specific time, such as at 8:00 am (UTC+0) every 1st
day of the month.
A cron
expression consists of six fields separated by white spaces:
(minutes hours day_of_month month day_of_week year)
.
A rate
expression consists of a value as a positive integer, and a
unit with the following options: minute
| minutes
| hour
|
hours
| day
| days
For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide.
createSchedule_target :: Lens' CreateSchedule Target Source #
The schedule's target.
Destructuring the Response
data CreateScheduleResponse Source #
See: newCreateScheduleResponse
smart constructor.
CreateScheduleResponse' | |
|
Instances
newCreateScheduleResponse Source #
:: Int | |
-> Text | |
-> CreateScheduleResponse |
Create a value of CreateScheduleResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:CreateScheduleResponse'
, createScheduleResponse_httpStatus
- The response's http status code.
$sel:scheduleArn:CreateScheduleResponse'
, createScheduleResponse_scheduleArn
- The Amazon Resource Name (ARN) of the schedule.
Response Lenses
createScheduleResponse_httpStatus :: Lens' CreateScheduleResponse Int Source #
The response's http status code.
createScheduleResponse_scheduleArn :: Lens' CreateScheduleResponse Text Source #
The Amazon Resource Name (ARN) of the schedule.