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.UpdateSchedule

Description

Updates the specified schedule. When you call UpdateSchedule, EventBridge Scheduler uses all values, including empty values, specified in the request and overrides the existing schedule. This is by design. This means that if you do not set an optional field in your request, that field will be set to its system-default value after the update.

Before calling this operation, we recommend that you call the GetSchedule API operation and make a note of all optional parameters for your UpdateSchedule call.

Synopsis

Creating a Request

data UpdateSchedule Source #

See: newUpdateSchedule smart constructor.

Constructors

UpdateSchedule' 

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 with which the schedule is associated. You must provide this value in order for EventBridge Scheduler to find the schedule you want to update. If you omit this value, EventBridge Scheduler assumes the group is associated to the default group.

  • kmsKeyArn :: Maybe Text

    The ARN for the customer managed KMS key that that you want EventBridge Scheduler to 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 updating.

  • 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 target. You can use this operation to change the target that your schedule invokes.

Instances

Instances details
ToJSON UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

ToHeaders UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

ToPath UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

ToQuery UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

AWSRequest UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Associated Types

type AWSResponse UpdateSchedule #

Generic UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Associated Types

type Rep UpdateSchedule :: Type -> Type #

Read UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Show UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

NFData UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Methods

rnf :: UpdateSchedule -> () #

Eq UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Hashable UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

type AWSResponse UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

type Rep UpdateSchedule Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

type Rep UpdateSchedule = D1 ('MetaData "UpdateSchedule" "Amazonka.Scheduler.UpdateSchedule" "amazonka-scheduler-2.0-8LKlva3Whvt7TpHIvtcn6a" 'False) (C1 ('MetaCons "UpdateSchedule'" '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))))))

newUpdateSchedule Source #

Create a value of UpdateSchedule 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:UpdateSchedule', updateSchedule_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:UpdateSchedule', updateSchedule_description - The description you specify for the schedule.

$sel:endDate:UpdateSchedule', updateSchedule_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.

UpdateSchedule, updateSchedule_groupName - The name of the schedule group with which the schedule is associated. You must provide this value in order for EventBridge Scheduler to find the schedule you want to update. If you omit this value, EventBridge Scheduler assumes the group is associated to the default group.

$sel:kmsKeyArn:UpdateSchedule', updateSchedule_kmsKeyArn - The ARN for the customer managed KMS key that that you want EventBridge Scheduler to use to encrypt and decrypt your data.

$sel:scheduleExpressionTimezone:UpdateSchedule', updateSchedule_scheduleExpressionTimezone - The timezone in which the scheduling expression is evaluated.

$sel:startDate:UpdateSchedule', updateSchedule_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.

UpdateSchedule, updateSchedule_state - Specifies whether the schedule is enabled or disabled.

$sel:flexibleTimeWindow:UpdateSchedule', updateSchedule_flexibleTimeWindow - Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

UpdateSchedule, updateSchedule_name - The name of the schedule that you are updating.

$sel:scheduleExpression:UpdateSchedule', updateSchedule_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.

UpdateSchedule, updateSchedule_target - The schedule target. You can use this operation to change the target that your schedule invokes.

Request Lenses

updateSchedule_clientToken :: Lens' UpdateSchedule (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.

updateSchedule_description :: Lens' UpdateSchedule (Maybe Text) Source #

The description you specify for the schedule.

updateSchedule_endDate :: Lens' UpdateSchedule (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.

updateSchedule_groupName :: Lens' UpdateSchedule (Maybe Text) Source #

The name of the schedule group with which the schedule is associated. You must provide this value in order for EventBridge Scheduler to find the schedule you want to update. If you omit this value, EventBridge Scheduler assumes the group is associated to the default group.

updateSchedule_kmsKeyArn :: Lens' UpdateSchedule (Maybe Text) Source #

The ARN for the customer managed KMS key that that you want EventBridge Scheduler to use to encrypt and decrypt your data.

updateSchedule_scheduleExpressionTimezone :: Lens' UpdateSchedule (Maybe Text) Source #

The timezone in which the scheduling expression is evaluated.

updateSchedule_startDate :: Lens' UpdateSchedule (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.

updateSchedule_state :: Lens' UpdateSchedule (Maybe ScheduleState) Source #

Specifies whether the schedule is enabled or disabled.

updateSchedule_flexibleTimeWindow :: Lens' UpdateSchedule FlexibleTimeWindow Source #

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

updateSchedule_name :: Lens' UpdateSchedule Text Source #

The name of the schedule that you are updating.

updateSchedule_scheduleExpression :: Lens' UpdateSchedule 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.

updateSchedule_target :: Lens' UpdateSchedule Target Source #

The schedule target. You can use this operation to change the target that your schedule invokes.

Destructuring the Response

data UpdateScheduleResponse Source #

See: newUpdateScheduleResponse smart constructor.

Constructors

UpdateScheduleResponse' 

Fields

Instances

Instances details
Generic UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Associated Types

type Rep UpdateScheduleResponse :: Type -> Type #

Read UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Show UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

NFData UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

Methods

rnf :: UpdateScheduleResponse -> () #

Eq UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

type Rep UpdateScheduleResponse Source # 
Instance details

Defined in Amazonka.Scheduler.UpdateSchedule

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

newUpdateScheduleResponse Source #

Create a value of UpdateScheduleResponse 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:UpdateScheduleResponse', updateScheduleResponse_httpStatus - The response's http status code.

$sel:scheduleArn:UpdateScheduleResponse', updateScheduleResponse_scheduleArn - The Amazon Resource Name (ARN) of the schedule that you updated.

Response Lenses

updateScheduleResponse_scheduleArn :: Lens' UpdateScheduleResponse Text Source #

The Amazon Resource Name (ARN) of the schedule that you updated.