Try AWS Native preview for resources not in the classic version.
aws.ssm.MaintenanceWindow
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an SSM Maintenance Window resource
Example Usage
using System.Collections.Generic;
using System.Linq;
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.
- Allow
Unassociated boolTargets 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
.- End
Date string Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
- Name string
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 string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- Start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.
- Allow
Unassociated boolTargets 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
.- End
Date string Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
- Name string
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 string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- Start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.
- allow
Unassociated BooleanTargets 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
.- end
Date String Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
- name String
The name of the maintenance window.
- schedule
Offset Integer The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone String Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date String Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.
- allow
Unassociated booleanTargets 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
.- end
Date string Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
- name string
The name of the maintenance window.
- schedule
Offset number The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- {[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_ booltargets 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
, orAsia/Seoul
.- start_
date str Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.
- allow
Unassociated BooleanTargets 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
.- end
Date String Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
- name String
The name of the maintenance window.
- schedule
Offset Number The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone String Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date String Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.
- 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.
- 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.
- 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.
- {[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.
- 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.
- 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.
- Allow
Unassociated boolTargets 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
.- End
Date 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.
- 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 string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- Start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Allow
Unassociated boolTargets 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
.- End
Date 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.
- 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 string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- Start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allow
Unassociated BooleanTargets 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
.- end
Date 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.
- schedule
Offset Integer The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone String Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date String Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allow
Unassociated booleanTargets 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
.- end
Date 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.
- schedule
Offset number The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone string Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date string Timestamp in ISO-8601 extended format when to begin the maintenance window.
- {[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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allow_
unassociated_ booltargets 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
, orAsia/Seoul
.- start_
date str Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allow
Unassociated BooleanTargets 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
.- end
Date 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.
- schedule
Offset Number The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
- schedule
Timezone String Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example:
America/Los_Angeles
,etc/UTC
, orAsia/Seoul
.- start
Date String Timestamp in ISO-8601 extended format when to begin the maintenance window.
- 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.- 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.
Try AWS Native preview for resources not in the classic version.