Skip to content
v2.278.0

CfnMaintenanceWindowProps Struct ​

Properties for defining a CfnMaintenanceWindow.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ssm as ssm } from 'aws-cdk-lib';
const cfnMaintenanceWindowProps: ssm.CfnMaintenanceWindowProps = {
  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: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ssm as ssm

cfn_maintenance_window_props = ssm.CfnMaintenanceWindowProps(
    allow_unassociated_targets=False,
    cutoff=123,
    duration=123,
    name="name",
    schedule="schedule",

    # the properties below are optional
    description="description",
    end_date="endDate",
    schedule_offset=123,
    schedule_timezone="scheduleTimezone",
    start_date="startDate",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// 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.*;

CfnMaintenanceWindowProps cfnMaintenanceWindowProps = CfnMaintenanceWindowProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SSM;

var cfnMaintenanceWindowProps = new CfnMaintenanceWindowProps {
    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 = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnMaintenanceWindowProps := &CfnMaintenanceWindowProps{
	AllowUnassociatedTargets: jsii.Boolean(false),
	Cutoff: jsii.Number(123),
	Duration: jsii.Number(123),
	Name: jsii.String("name"),
	Schedule: jsii.String("schedule"),

	// the properties below are optional
	Description: jsii.String("description"),
	EndDate: jsii.String("endDate"),
	ScheduleOffset: jsii.Number(123),
	ScheduleTimezone: jsii.String("scheduleTimezone"),
	StartDate: jsii.String("startDate"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

allowUnassociatedTargetsboolean | IResolvableallow_unassociated_targetstyping.Union[bool, IResolvable]allowUnassociatedTargetsBooleanAllowUnassociatedTargetsboolAllowUnassociatedTargetsinterface{} required #
Enables a maintenance window task to run on managed instances, even if you have not 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.

cutoffnumbercutoffint | floatcutoffNumberCutoffdoubleCutoff*float64 required #
The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the maintenance window.
durationnumberdurationint | floatdurationNumberDurationdoubleDuration*float64 required #
The duration of the maintenance window in hours.
endDateoptionalstringend_dateoptionalstrendDateoptionalStringEndDateoptionalstringEndDateoptional*string #
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
namestringnamestrnameStringNamestringName*string required #
The name of the maintenance window.
schedulestringschedulestrscheduleStringSchedulestringSchedule*string required #
The schedule of the maintenance window in the form of a cron or rate expression.
scheduleOffsetoptionalnumberschedule_offsetoptionalint | floatscheduleOffsetoptionalNumberScheduleOffsetoptionaldoubleScheduleOffsetoptional*float64 #
The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
scheduleTimezoneoptionalstringschedule_timezoneoptionalstrscheduleTimezoneoptionalStringScheduleTimezoneoptionalstringScheduleTimezoneoptional*string #
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
startDateoptionalstringstart_dateoptionalstrstartDateoptionalStringStartDateoptionalstringStartDateoptional*string #
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.

StartDate allows you to delay activation of the maintenance window until the specified future date.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
notes

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.