Class CfnMaintenanceWindow

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-11T03:46:01.856Z") @Stability(Stable) public class CfnMaintenanceWindow extends CfnResource implements IInspectable, ITaggable
The AWS::SSM::MaintenanceWindow resource represents general information about a maintenance window for AWS Systems Manager .

Maintenance windows let you define a schedule for when to perform potentially disruptive actions on your instances, such as patching an operating system (OS), updating drivers, or installing software. Each maintenance window has a schedule, a duration, a set of registered targets, and a set of registered tasks.

For more information, see Systems Manager Maintenance Windows in the AWS Systems Manager User Guide and CreateMaintenanceWindow in the AWS Systems Manager API Reference .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ssm.*;
 CfnMaintenanceWindow cfnMaintenanceWindow = CfnMaintenanceWindow.Builder.create(this, "MyCfnMaintenanceWindow")
         .allowUnassociatedTargets(false)
         .cutoff(123)
         .duration(123)
         .name("name")
         .schedule("schedule")
         // the properties below are optional
         .description("description")
         .endDate("endDate")
         .scheduleOffset(123)
         .scheduleTimezone("scheduleTimezone")
         .startDate("startDate")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnMaintenanceWindow

      protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnMaintenanceWindow

      protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnMaintenanceWindow

      @Stability(Stable) public CfnMaintenanceWindow(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMaintenanceWindowProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAllowUnassociatedTargets

      @Stability(Stable) @NotNull public Object getAllowUnassociatedTargets()
      Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
    • setAllowUnassociatedTargets

      @Stability(Stable) public void setAllowUnassociatedTargets(@NotNull Boolean value)
      Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
    • setAllowUnassociatedTargets

      @Stability(Stable) public void setAllowUnassociatedTargets(@NotNull IResolvable value)
      Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
    • getCutoff

      @Stability(Stable) @NotNull public Number getCutoff()
      The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    • setCutoff

      @Stability(Stable) public void setCutoff(@NotNull Number value)
      The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    • getDuration

      @Stability(Stable) @NotNull public Number getDuration()
      The duration of the maintenance window in hours.
    • setDuration

      @Stability(Stable) public void setDuration(@NotNull Number value)
      The duration of the maintenance window in hours.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the maintenance window.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the maintenance window.
    • getSchedule

      @Stability(Stable) @NotNull public String getSchedule()
      The schedule of the maintenance window in the form of a cron or rate expression.
    • setSchedule

      @Stability(Stable) public void setSchedule(@NotNull String value)
      The schedule of the maintenance window in the form of a cron or rate expression.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the maintenance window.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the maintenance window.
    • getEndDate

      @Stability(Stable) @Nullable public String getEndDate()
      The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    • setEndDate

      @Stability(Stable) public void setEndDate(@Nullable String value)
      The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    • getScheduleOffset

      @Stability(Stable) @Nullable public Number getScheduleOffset()
      The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    • setScheduleOffset

      @Stability(Stable) public void setScheduleOffset(@Nullable Number value)
      The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    • getScheduleTimezone

      @Stability(Stable) @Nullable public String getScheduleTimezone()
      The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    • setScheduleTimezone

      @Stability(Stable) public void setScheduleTimezone(@Nullable String value)
      The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    • getStartDate

      @Stability(Stable) @Nullable public String getStartDate()
      The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
    • setStartDate

      @Stability(Stable) public void setStartDate(@Nullable String value)
      The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).