aws logo
AWS Classic v5.29.0, Feb 1 23

aws.ssm.MaintenanceWindow

Provides an SSM Maintenance Window resource

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var production = new Aws.Ssm.MaintenanceWindow("production", new()
    {
        Cutoff = 1,
        Duration = 3,
        Schedule = "cron(0 16 ? * TUE *)",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssm.NewMaintenanceWindow(ctx, "production", &ssm.MaintenanceWindowArgs{
			Cutoff:   pulumi.Int(1),
			Duration: pulumi.Int(3),
			Schedule: pulumi.String("cron(0 16 ? * TUE *)"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.MaintenanceWindow;
import com.pulumi.aws.ssm.MaintenanceWindowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var production = new MaintenanceWindow("production", MaintenanceWindowArgs.builder()        
            .cutoff(1)
            .duration(3)
            .schedule("cron(0 16 ? * TUE *)")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

production = aws.ssm.MaintenanceWindow("production",
    cutoff=1,
    duration=3,
    schedule="cron(0 16 ? * TUE *)")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const production = new aws.ssm.MaintenanceWindow("production", {
    cutoff: 1,
    duration: 3,
    schedule: "cron(0 16 ? * TUE *)",
});
resources:
  production:
    type: aws:ssm:MaintenanceWindow
    properties:
      cutoff: 1
      duration: 3
      schedule: cron(0 16 ? * TUE *)

Create MaintenanceWindow Resource

new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);
@overload
def MaintenanceWindow(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      allow_unassociated_targets: Optional[bool] = None,
                      cutoff: Optional[int] = None,
                      description: Optional[str] = None,
                      duration: Optional[int] = None,
                      enabled: Optional[bool] = None,
                      end_date: Optional[str] = None,
                      name: Optional[str] = None,
                      schedule: Optional[str] = None,
                      schedule_offset: Optional[int] = None,
                      schedule_timezone: Optional[str] = None,
                      start_date: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
@overload
def MaintenanceWindow(resource_name: str,
                      args: MaintenanceWindowArgs,
                      opts: Optional[ResourceOptions] = 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:ssm:MaintenanceWindow
properties: # The arguments to resource properties.
options: # 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.
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

The MaintenanceWindow resource accepts the following input properties:

Cutoff int

The number of hours before the end of the Maintenance Window that 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.

AllowUnassociatedTargets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

Description string

A description for the maintenance window.

Enabled bool

Whether the maintenance window is enabled. Default: true.

EndDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

Name string

The name of the maintenance window.

ScheduleOffset int

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

ScheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

StartDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

Tags Dictionary<string, string>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Cutoff int

The number of hours before the end of the Maintenance Window that 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.

AllowUnassociatedTargets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

Description string

A description for the maintenance window.

Enabled bool

Whether the maintenance window is enabled. Default: true.

EndDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

Name string

The name of the maintenance window.

ScheduleOffset int

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

ScheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

StartDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

Tags map[string]string

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

cutoff Integer

The number of hours before the end of the Maintenance Window that 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.

allowUnassociatedTargets Boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

description String

A description for the maintenance window.

enabled Boolean

Whether the maintenance window is enabled. Default: true.

endDate String

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name String

The name of the maintenance window.

scheduleOffset Integer

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

scheduleTimezone String

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate String

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Map<String,String>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

cutoff number

The number of hours before the end of the Maintenance Window that 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.

allowUnassociatedTargets boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

description string

A description for the maintenance window.

enabled boolean

Whether the maintenance window is enabled. Default: true.

endDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name string

The name of the maintenance window.

scheduleOffset number

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

scheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags {[key: string]: string}

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

cutoff int

The number of hours before the end of the Maintenance Window that 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.

allow_unassociated_targets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

description str

A description for the maintenance window.

enabled bool

Whether the maintenance window is enabled. Default: true.

end_date str

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name str

The name of the maintenance window.

schedule_offset int

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

schedule_timezone str

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

start_date str

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Mapping[str, str]

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

cutoff Number

The number of hours before the end of the Maintenance Window that 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.

allowUnassociatedTargets Boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

description String

A description for the maintenance window.

enabled Boolean

Whether the maintenance window is enabled. Default: true.

endDate String

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name String

The name of the maintenance window.

scheduleOffset Number

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

scheduleTimezone String

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate String

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Map<String>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing MaintenanceWindow Resource

Get an existing MaintenanceWindow resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MaintenanceWindowState, opts?: CustomResourceOptions): MaintenanceWindow
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_unassociated_targets: Optional[bool] = None,
        cutoff: Optional[int] = None,
        description: Optional[str] = None,
        duration: Optional[int] = None,
        enabled: Optional[bool] = None,
        end_date: Optional[str] = None,
        name: Optional[str] = None,
        schedule: Optional[str] = None,
        schedule_offset: Optional[int] = None,
        schedule_timezone: Optional[str] = None,
        start_date: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> MaintenanceWindow
func GetMaintenanceWindow(ctx *Context, name string, id IDInput, state *MaintenanceWindowState, opts ...ResourceOption) (*MaintenanceWindow, error)
public static MaintenanceWindow Get(string name, Input<string> id, MaintenanceWindowState? state, CustomResourceOptions? opts = null)
public static MaintenanceWindow get(String name, Output<String> id, MaintenanceWindowState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllowUnassociatedTargets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

Cutoff int

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

Description string

A description for the maintenance window.

Duration int

The duration of the Maintenance Window in hours.

Enabled bool

Whether the maintenance window is enabled. Default: true.

EndDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

Name string

The name of the maintenance window.

Schedule string

The schedule of the Maintenance Window in the form of a cron or rate expression.

ScheduleOffset int

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

ScheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

StartDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

Tags Dictionary<string, string>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

AllowUnassociatedTargets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

Cutoff int

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

Description string

A description for the maintenance window.

Duration int

The duration of the Maintenance Window in hours.

Enabled bool

Whether the maintenance window is enabled. Default: true.

EndDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

Name string

The name of the maintenance window.

Schedule string

The schedule of the Maintenance Window in the form of a cron or rate expression.

ScheduleOffset int

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

ScheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

StartDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

Tags map[string]string

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

allowUnassociatedTargets Boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

cutoff Integer

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

description String

A description for the maintenance window.

duration Integer

The duration of the Maintenance Window in hours.

enabled Boolean

Whether the maintenance window is enabled. Default: true.

endDate String

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name String

The name of the maintenance window.

schedule String

The schedule of the Maintenance Window in the form of a cron or rate expression.

scheduleOffset Integer

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

scheduleTimezone String

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate String

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Map<String,String>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

allowUnassociatedTargets boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

cutoff number

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

description string

A description for the maintenance window.

duration number

The duration of the Maintenance Window in hours.

enabled boolean

Whether the maintenance window is enabled. Default: true.

endDate string

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name string

The name of the maintenance window.

schedule string

The schedule of the Maintenance Window in the form of a cron or rate expression.

scheduleOffset number

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

scheduleTimezone string

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate string

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags {[key: string]: string}

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

allow_unassociated_targets bool

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

cutoff int

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

description str

A description for the maintenance window.

duration int

The duration of the Maintenance Window in hours.

enabled bool

Whether the maintenance window is enabled. Default: true.

end_date str

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name str

The name of the maintenance window.

schedule str

The schedule of the Maintenance Window in the form of a cron or rate expression.

schedule_offset int

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

schedule_timezone str

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

start_date str

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Mapping[str, str]

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

allowUnassociatedTargets Boolean

Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.

cutoff Number

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

description String

A description for the maintenance window.

duration Number

The duration of the Maintenance Window in hours.

enabled Boolean

Whether the maintenance window is enabled. Default: true.

endDate String

Timestamp in ISO-8601 extended format when to no longer run the maintenance window.

name String

The name of the maintenance window.

schedule String

The schedule of the Maintenance Window in the form of a cron or rate expression.

scheduleOffset Number

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

scheduleTimezone String

Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: America/Los_Angeles, etc/UTC, or Asia/Seoul.

startDate String

Timestamp in ISO-8601 extended format when to begin the maintenance window.

tags Map<String>

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Import

SSM

Maintenance Windows can be imported using the maintenance window id, e.g.,

 $ pulumi import aws:ssm/maintenanceWindow:MaintenanceWindow imported-window mw-0123456789

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.