1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ssm
  5. MaintenanceWindow

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.57.0
published on Monday, Mar 9, 2026 by Pulumi
aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.57.0
published on Monday, Mar 9, 2026 by Pulumi

    Resource type definition for AWS::SSM::MaintenanceWindow

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var maintenanceWindow = new AwsNative.Ssm.MaintenanceWindow("maintenanceWindow", new()
        {
            AllowUnassociatedTargets = false,
            Cutoff = 1,
            Description = "Maintenance Window to update SSM Agent",
            Duration = 2,
            Name = "UpdateSSMAgentMaintenanceWindow",
            Schedule = "cron(0 4 ? * SUN *)",
            ScheduleTimezone = "US/Eastern",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewMaintenanceWindow(ctx, "maintenanceWindow", &ssm.MaintenanceWindowArgs{
    			AllowUnassociatedTargets: pulumi.Bool(false),
    			Cutoff:                   pulumi.Int(1),
    			Description:              pulumi.String("Maintenance Window to update SSM Agent"),
    			Duration:                 pulumi.Int(2),
    			Name:                     pulumi.String("UpdateSSMAgentMaintenanceWindow"),
    			Schedule:                 pulumi.String("cron(0 4 ? * SUN *)"),
    			ScheduleTimezone:         pulumi.String("US/Eastern"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const maintenanceWindow = new aws_native.ssm.MaintenanceWindow("maintenanceWindow", {
        allowUnassociatedTargets: false,
        cutoff: 1,
        description: "Maintenance Window to update SSM Agent",
        duration: 2,
        name: "UpdateSSMAgentMaintenanceWindow",
        schedule: "cron(0 4 ? * SUN *)",
        scheduleTimezone: "US/Eastern",
    });
    
    import pulumi
    import pulumi_aws_native as aws_native
    
    maintenance_window = aws_native.ssm.MaintenanceWindow("maintenanceWindow",
        allow_unassociated_targets=False,
        cutoff=1,
        description="Maintenance Window to update SSM Agent",
        duration=2,
        name="UpdateSSMAgentMaintenanceWindow",
        schedule="cron(0 4 ? * SUN *)",
        schedule_timezone="US/Eastern")
    

    Example coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var maintenanceWindow = new AwsNative.Ssm.MaintenanceWindow("maintenanceWindow", new()
        {
            AllowUnassociatedTargets = false,
            Cutoff = 1,
            Description = "Maintenance Window to update SSM Agent",
            Duration = 2,
            Name = "UpdateSSMAgentMaintenanceWindow",
            Schedule = "cron(0 4 ? * SUN *)",
            ScheduleTimezone = "US/Eastern",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewMaintenanceWindow(ctx, "maintenanceWindow", &ssm.MaintenanceWindowArgs{
    			AllowUnassociatedTargets: pulumi.Bool(false),
    			Cutoff:                   pulumi.Int(1),
    			Description:              pulumi.String("Maintenance Window to update SSM Agent"),
    			Duration:                 pulumi.Int(2),
    			Name:                     pulumi.String("UpdateSSMAgentMaintenanceWindow"),
    			Schedule:                 pulumi.String("cron(0 4 ? * SUN *)"),
    			ScheduleTimezone:         pulumi.String("US/Eastern"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const maintenanceWindow = new aws_native.ssm.MaintenanceWindow("maintenanceWindow", {
        allowUnassociatedTargets: false,
        cutoff: 1,
        description: "Maintenance Window to update SSM Agent",
        duration: 2,
        name: "UpdateSSMAgentMaintenanceWindow",
        schedule: "cron(0 4 ? * SUN *)",
        scheduleTimezone: "US/Eastern",
    });
    
    import pulumi
    import pulumi_aws_native as aws_native
    
    maintenance_window = aws_native.ssm.MaintenanceWindow("maintenanceWindow",
        allow_unassociated_targets=False,
        cutoff=1,
        description="Maintenance Window to update SSM Agent",
        duration=2,
        name="UpdateSSMAgentMaintenanceWindow",
        schedule="cron(0 4 ? * SUN *)",
        schedule_timezone="US/Eastern")
    

    Example coming soon!

    Create MaintenanceWindow Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);
    @overload
    def MaintenanceWindow(resource_name: str,
                          args: MaintenanceWindowArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MaintenanceWindow(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          allow_unassociated_targets: Optional[bool] = None,
                          cutoff: Optional[int] = None,
                          duration: Optional[int] = None,
                          schedule: Optional[str] = None,
                          description: Optional[str] = None,
                          end_date: Optional[str] = None,
                          name: Optional[str] = None,
                          schedule_offset: Optional[int] = None,
                          schedule_timezone: Optional[str] = None,
                          start_date: Optional[str] = None,
                          tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewMaintenanceWindow(ctx *Context, name string, args MaintenanceWindowArgs, opts ...ResourceOption) (*MaintenanceWindow, error)
    public MaintenanceWindow(string name, MaintenanceWindowArgs args, CustomResourceOptions? opts = null)
    public MaintenanceWindow(String name, MaintenanceWindowArgs args)
    public MaintenanceWindow(String name, MaintenanceWindowArgs args, CustomResourceOptions options)
    
    type: aws-native:ssm:MaintenanceWindow
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MaintenanceWindow Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MaintenanceWindow resource accepts the following input properties:

    AllowUnassociatedTargets bool
    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.
    Cutoff int
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    Duration int
    The duration of the maintenance window in hours.
    Schedule string
    The schedule of the maintenance window in the form of a cron or rate expression.
    Description string
    A description of the maintenance window.
    EndDate string
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    Name string
    The name of the maintenance window.
    ScheduleOffset int
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    ScheduleTimezone string
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    StartDate 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.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.
    AllowUnassociatedTargets bool
    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.
    Cutoff int
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    Duration int
    The duration of the maintenance window in hours.
    Schedule string
    The schedule of the maintenance window in the form of a cron or rate expression.
    Description string
    A description of the maintenance window.
    EndDate string
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    Name string
    The name of the maintenance window.
    ScheduleOffset int
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    ScheduleTimezone string
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    StartDate 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.
    Tags TagArgs
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.
    allowUnassociatedTargets Boolean
    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.
    cutoff Integer
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    duration Integer
    The duration of the maintenance window in hours.
    schedule String
    The schedule of the maintenance window in the form of a cron or rate expression.
    description String
    A description of the maintenance window.
    endDate String
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    name String
    The name of the maintenance window.
    scheduleOffset Integer
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    scheduleTimezone String
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    startDate 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.
    tags List<Tag>
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.
    allowUnassociatedTargets boolean
    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.
    cutoff number
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    duration number
    The duration of the maintenance window in hours.
    schedule string
    The schedule of the maintenance window in the form of a cron or rate expression.
    description string
    A description of the maintenance window.
    endDate string
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    name string
    The name of the maintenance window.
    scheduleOffset number
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    scheduleTimezone string
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    startDate 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.
    tags Tag[]
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.
    allow_unassociated_targets bool
    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.
    cutoff int
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    duration int
    The duration of the maintenance window in hours.
    schedule str
    The schedule of the maintenance window in the form of a cron or rate expression.
    description str
    A description of the maintenance window.
    end_date str
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    name str
    The name of the maintenance window.
    schedule_offset int
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    schedule_timezone str
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    start_date str
    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.
    tags Sequence[TagArgs]
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.
    allowUnassociatedTargets Boolean
    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.
    cutoff Number
    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
    duration Number
    The duration of the maintenance window in hours.
    schedule String
    The schedule of the maintenance window in the form of a cron or rate expression.
    description String
    A description of the maintenance window.
    endDate String
    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
    name String
    The name of the maintenance window.
    scheduleOffset Number
    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
    scheduleTimezone String
    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
    startDate 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.
    tags List<Property Map>
    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MaintenanceWindow resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    WindowId string
    The ID of the maintenance window.
    Id string
    The provider-assigned unique ID for this managed resource.
    WindowId string
    The ID of the maintenance window.
    id String
    The provider-assigned unique ID for this managed resource.
    windowId String
    The ID of the maintenance window.
    id string
    The provider-assigned unique ID for this managed resource.
    windowId string
    The ID of the maintenance window.
    id str
    The provider-assigned unique ID for this managed resource.
    window_id str
    The ID of the maintenance window.
    id String
    The provider-assigned unique ID for this managed resource.
    windowId String
    The ID of the maintenance window.

    Supporting Types

    Tag, TagArgs

    A set of tags to apply to the resource.
    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.57.0
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.