@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.299Z") @Stability(value=Stable) public class CfnMaintenanceWindow extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnMaintenanceWindow.Builder
A fluent builder for
CfnMaintenanceWindow. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnMaintenanceWindow(software.constructs.Construct scope,
String id,
CfnMaintenanceWindowProps props)
Create a new `AWS::SSM::MaintenanceWindow`.
|
protected |
CfnMaintenanceWindow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnMaintenanceWindow(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAllowUnassociatedTargets()
Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
|
protected Map<String,Object> |
getCfnProperties() |
Number |
getCutoff()
The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
|
String |
getDescription()
A description of the maintenance window.
|
Number |
getDuration()
The duration of the maintenance window in hours.
|
String |
getEndDate()
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
|
String |
getName()
The name of the maintenance window.
|
String |
getSchedule()
The schedule of the maintenance window in the form of a cron or rate expression.
|
Number |
getScheduleOffset()
The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
|
String |
getScheduleTimezone()
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
|
String |
getStartDate()
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
|
TagManager |
getTags()
Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAllowUnassociatedTargets(Boolean value)
Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
|
void |
setAllowUnassociatedTargets(IResolvable value)
Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
|
void |
setCutoff(Number value)
The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
|
void |
setDescription(String value)
A description of the maintenance window.
|
void |
setDuration(Number value)
The duration of the maintenance window in hours.
|
void |
setEndDate(String value)
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
|
void |
setName(String value)
The name of the maintenance window.
|
void |
setSchedule(String value)
The schedule of the maintenance window in the form of a cron or rate expression.
|
void |
setScheduleOffset(Number value)
The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
|
void |
setScheduleTimezone(String value)
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
|
void |
setStartDate(String value)
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnMaintenanceWindow(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnMaintenanceWindowProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
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.
@Stability(value=Stable) @NotNull public Object getAllowUnassociatedTargets()
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
@Stability(value=Stable)
public void setAllowUnassociatedTargets(@NotNull
Boolean value)
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
@Stability(value=Stable)
public void setAllowUnassociatedTargets(@NotNull
IResolvable value)
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
@Stability(value=Stable) @NotNull public Number getCutoff()
@Stability(value=Stable)
public void setCutoff(@NotNull
Number value)
@Stability(value=Stable) @NotNull public Number getDuration()
@Stability(value=Stable)
public void setDuration(@NotNull
Number value)
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getSchedule()
@Stability(value=Stable)
public void setSchedule(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getEndDate()
@Stability(value=Stable)
public void setEndDate(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getScheduleOffset()
@Stability(value=Stable)
public void setScheduleOffset(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getScheduleTimezone()
@Stability(value=Stable)
public void setScheduleTimezone(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getStartDate()
StartDate allows you to delay activation of the Maintenance Window until the specified future date.
@Stability(value=Stable)
public void setStartDate(@Nullable
String value)
StartDate allows you to delay activation of the Maintenance Window until the specified future date.
Copyright © 2022. All rights reserved.