libZSservicesZSamazonka-ssmZSamazonka-ssm
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SSM.CreateMaintenanceWindow

Description

Creates a new maintenance window.

The value you specify for Duration determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for Cutoff. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for Cutoff is one hour, no maintenance window tasks can start after 5 PM.

Synopsis

Creating a Request

data CreateMaintenanceWindow Source #

See: newCreateMaintenanceWindow smart constructor.

Constructors

CreateMaintenanceWindow' 

Fields

  • clientToken :: Maybe Text

    User-provided idempotency token.

  • scheduleOffset :: Maybe Natural

    The number of days to wait after the date and time specified by a cron expression before running the maintenance window.

    For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.

    cron(30 23 ? * TUE#3 *)

    If the schedule offset is 2, the maintenance window won't run until two days later.

  • endDate :: Maybe Text

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.

  • scheduleTimezone :: Maybe Text

    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

  • startDate :: Maybe Text

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.

  • description :: Maybe (Sensitive Text)

    An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.

  • tags :: Maybe [Tag]

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:

    • Key=TaskType,Value=AgentUpdate
    • Key=OS,Value=Windows
    • Key=Environment,Value=Production

    To add tags to an existing maintenance window, use the AddTagsToResource operation.

  • name :: Text

    The name of the maintenance window.

  • schedule :: Text

    The schedule of the maintenance window in the form of a cron or rate expression.

  • duration :: Natural

    The duration of the maintenance window in hours.

  • cutoff :: Natural

    The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.

  • allowUnassociatedTargets :: Bool

    Enables a maintenance window task to run on managed instances, even if you haven't registered those instances as targets. If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.

    If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.

Instances

Instances details
Eq CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Show CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Generic CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Associated Types

type Rep CreateMaintenanceWindow :: Type -> Type #

NFData CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Methods

rnf :: CreateMaintenanceWindow -> () #

Hashable CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

ToJSON CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

AWSRequest CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

ToHeaders CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

ToPath CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

ToQuery CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

type Rep CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

type Rep CreateMaintenanceWindow = D1 ('MetaData "CreateMaintenanceWindow" "Amazonka.SSM.CreateMaintenanceWindow" "libZSservicesZSamazonka-ssmZSamazonka-ssm" 'False) (C1 ('MetaCons "CreateMaintenanceWindow'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "scheduleOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "scheduleTimezone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "startDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text)))))) :*: ((S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "schedule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "cutoff") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "allowUnassociatedTargets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))))
type AWSResponse CreateMaintenanceWindow Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

newCreateMaintenanceWindow Source #

Create a value of CreateMaintenanceWindow 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:CreateMaintenanceWindow', createMaintenanceWindow_clientToken - User-provided idempotency token.

$sel:scheduleOffset:CreateMaintenanceWindow', createMaintenanceWindow_scheduleOffset - The number of days to wait after the date and time specified by a cron expression before running the maintenance window.

For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.

cron(30 23 ? * TUE#3 *)

If the schedule offset is 2, the maintenance window won't run until two days later.

$sel:endDate:CreateMaintenanceWindow', createMaintenanceWindow_endDate - The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.

$sel:scheduleTimezone:CreateMaintenanceWindow', createMaintenanceWindow_scheduleTimezone - The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

$sel:startDate:CreateMaintenanceWindow', createMaintenanceWindow_startDate - The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.

$sel:description:CreateMaintenanceWindow', createMaintenanceWindow_description - An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.

$sel:tags:CreateMaintenanceWindow', createMaintenanceWindow_tags - Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:

  • Key=TaskType,Value=AgentUpdate
  • Key=OS,Value=Windows
  • Key=Environment,Value=Production

To add tags to an existing maintenance window, use the AddTagsToResource operation.

$sel:name:CreateMaintenanceWindow', createMaintenanceWindow_name - The name of the maintenance window.

$sel:schedule:CreateMaintenanceWindow', createMaintenanceWindow_schedule - The schedule of the maintenance window in the form of a cron or rate expression.

$sel:duration:CreateMaintenanceWindow', createMaintenanceWindow_duration - The duration of the maintenance window in hours.

$sel:cutoff:CreateMaintenanceWindow', createMaintenanceWindow_cutoff - The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.

$sel:allowUnassociatedTargets:CreateMaintenanceWindow', createMaintenanceWindow_allowUnassociatedTargets - Enables a maintenance window task to run on managed instances, even if you haven't registered those instances as targets. If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.

If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.

Request Lenses

createMaintenanceWindow_scheduleOffset :: Lens' CreateMaintenanceWindow (Maybe Natural) Source #

The number of days to wait after the date and time specified by a cron expression before running the maintenance window.

For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.

cron(30 23 ? * TUE#3 *)

If the schedule offset is 2, the maintenance window won't run until two days later.

createMaintenanceWindow_endDate :: Lens' CreateMaintenanceWindow (Maybe Text) Source #

The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.

createMaintenanceWindow_scheduleTimezone :: Lens' CreateMaintenanceWindow (Maybe Text) Source #

The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

createMaintenanceWindow_startDate :: Lens' CreateMaintenanceWindow (Maybe Text) Source #

The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.

createMaintenanceWindow_description :: Lens' CreateMaintenanceWindow (Maybe Text) Source #

An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.

createMaintenanceWindow_tags :: Lens' CreateMaintenanceWindow (Maybe [Tag]) Source #

Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:

  • Key=TaskType,Value=AgentUpdate
  • Key=OS,Value=Windows
  • Key=Environment,Value=Production

To add tags to an existing maintenance window, use the AddTagsToResource operation.

createMaintenanceWindow_schedule :: Lens' CreateMaintenanceWindow Text Source #

The schedule of the maintenance window in the form of a cron or rate expression.

createMaintenanceWindow_duration :: Lens' CreateMaintenanceWindow Natural Source #

The duration of the maintenance window in hours.

createMaintenanceWindow_cutoff :: Lens' CreateMaintenanceWindow Natural Source #

The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.

createMaintenanceWindow_allowUnassociatedTargets :: Lens' CreateMaintenanceWindow Bool Source #

Enables a maintenance window task to run on managed instances, even if you haven't registered those instances as targets. If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.

If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.

Destructuring the Response

data CreateMaintenanceWindowResponse Source #

See: newCreateMaintenanceWindowResponse smart constructor.

Constructors

CreateMaintenanceWindowResponse' 

Fields

Instances

Instances details
Eq CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Read CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Show CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Generic CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

Associated Types

type Rep CreateMaintenanceWindowResponse :: Type -> Type #

NFData CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

type Rep CreateMaintenanceWindowResponse Source # 
Instance details

Defined in Amazonka.SSM.CreateMaintenanceWindow

type Rep CreateMaintenanceWindowResponse = D1 ('MetaData "CreateMaintenanceWindowResponse" "Amazonka.SSM.CreateMaintenanceWindow" "libZSservicesZSamazonka-ssmZSamazonka-ssm" 'False) (C1 ('MetaCons "CreateMaintenanceWindowResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "windowId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateMaintenanceWindowResponse Source #

Create a value of CreateMaintenanceWindowResponse 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:windowId:CreateMaintenanceWindowResponse', createMaintenanceWindowResponse_windowId - The ID of the created maintenance window.

$sel:httpStatus:CreateMaintenanceWindowResponse', createMaintenanceWindowResponse_httpStatus - The response's http status code.

Response Lenses