amazonka-scheduler-2.0: Amazon EventBridge Scheduler SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Scheduler.CreateSchedule

Description

Creates the specified schedule.

Synopsis

Creating a Request

data CreateSchedule Source #

See: newCreateSchedule smart constructor.

Constructors

CreateSchedule' 

Fields

  • clientToken :: Maybe Text

    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.

  • description :: Maybe Text

    The description you specify for the schedule.

  • endDate :: Maybe POSIX

    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.

  • groupName :: Maybe Text

    The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.

  • kmsKeyArn :: Maybe Text

    The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

  • scheduleExpressionTimezone :: Maybe Text

    The timezone in which the scheduling expression is evaluated.

  • startDate :: Maybe POSIX

    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.

  • state :: Maybe ScheduleState

    Specifies whether the schedule is enabled or disabled.

  • flexibleTimeWindow :: FlexibleTimeWindow

    Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

  • name :: Text

    The name of the schedule that you are creating.

  • scheduleExpression :: Text

    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.

  • target :: Target

    The schedule's target.

Instances

Instances details
ToJSON CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

ToHeaders CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

ToPath CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

ToQuery CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

AWSRequest CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Associated Types

type AWSResponse CreateSchedule #

Generic CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Associated Types

type Rep CreateSchedule :: Type -> Type #

Read CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Show CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

NFData CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Methods

rnf :: CreateSchedule -> () #

Eq CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Hashable CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

type AWSResponse CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

type Rep CreateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

type Rep CreateSchedule = D1 ('MetaData "CreateSchedule" "Amazonka.Scheduler.CreateSchedule" "amazonka-scheduler-2.0-8LKlva3Whvt7TpHIvtcn6a" 'False) (C1 ('MetaCons "CreateSchedule'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "groupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "kmsKeyArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "scheduleExpressionTimezone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "startDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ScheduleState)) :*: S1 ('MetaSel ('Just "flexibleTimeWindow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FlexibleTimeWindow))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "scheduleExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Target))))))

newCreateSchedule Source #

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.

Destructuring the Response

data CreateScheduleResponse Source #

See: newCreateScheduleResponse smart constructor.

Constructors

CreateScheduleResponse' 

Fields

Instances

Instances details
Generic CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Associated Types

type Rep CreateScheduleResponse :: Type -> Type #

Read CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Show CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

NFData CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

Methods

rnf :: CreateScheduleResponse -> () #

Eq CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

type Rep CreateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.CreateSchedule

type Rep CreateScheduleResponse = D1 ('MetaData "CreateScheduleResponse" "Amazonka.Scheduler.CreateSchedule" "amazonka-scheduler-2.0-8LKlva3Whvt7TpHIvtcn6a" 'False) (C1 ('MetaCons "CreateScheduleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "scheduleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCreateScheduleResponse Source #

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_scheduleArn :: Lens' CreateScheduleResponse Text Source #

The Amazon Resource Name (ARN) of the schedule.