@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:20.907Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnMaintenanceWindow(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAllowUnassociatedTargets()
Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Number |
getCutoff()
The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.
|
java.lang.String |
getDescription()
A description of the maintenance window.
|
java.lang.Number |
getDuration()
The duration of the maintenance window in hours.
|
java.lang.String |
getEndDate()
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
|
java.lang.String |
getName()
The name of the maintenance window.
|
java.lang.String |
getSchedule()
The schedule of the maintenance window in the form of a cron or rate expression.
|
java.lang.Number |
getScheduleOffset()
The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
|
java.lang.String |
getScheduleTimezone()
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllowUnassociatedTargets(java.lang.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(java.lang.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(java.lang.String value)
A description of the maintenance window.
|
void |
setDuration(java.lang.Number value)
The duration of the maintenance window in hours.
|
void |
setEndDate(java.lang.String value)
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
|
void |
setName(java.lang.String value)
The name of the maintenance window.
|
void |
setSchedule(java.lang.String value)
The schedule of the maintenance window in the form of a cron or rate expression.
|
void |
setScheduleOffset(java.lang.Number value)
The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
|
void |
setScheduleTimezone(java.lang.String value)
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.
|
void |
setStartDate(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnMaintenanceWindow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnMaintenanceWindow(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
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.
public java.lang.Object getAllowUnassociatedTargets()
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
public void setAllowUnassociatedTargets(java.lang.Boolean value)
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
public void setAllowUnassociatedTargets(IResolvable value)
If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.
public java.lang.Number getCutoff()
public void setCutoff(java.lang.Number value)
public java.lang.Number getDuration()
public void setDuration(java.lang.Number value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getSchedule()
public void setSchedule(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getEndDate()
public void setEndDate(java.lang.String value)
public java.lang.Number getScheduleOffset()
public void setScheduleOffset(java.lang.Number value)
public java.lang.String getScheduleTimezone()
public void setScheduleTimezone(java.lang.String value)
public java.lang.String getStartDate()
StartDate allows you to delay activation of the Maintenance Window until the specified future date.
public void setStartDate(java.lang.String value)
StartDate allows you to delay activation of the Maintenance Window until the specified future date.