Class CfnMaintenanceWindowTask
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::SSM::MaintenanceWindowTask.
The AWS::SSM::MaintenanceWindowTask resource defines information about a task for an AWS Systems Manager maintenance window. For more information, see RegisterTaskWithMaintenanceWindow 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.*;
Object parameters;
Object taskParameters;
CfnMaintenanceWindowTask cfnMaintenanceWindowTask = CfnMaintenanceWindowTask.Builder.create(this, "MyCfnMaintenanceWindowTask")
.priority(123)
.taskArn("taskArn")
.taskType("taskType")
.windowId("windowId")
// the properties below are optional
.cutoffBehavior("cutoffBehavior")
.description("description")
.loggingInfo(LoggingInfoProperty.builder()
.region("region")
.s3Bucket("s3Bucket")
// the properties below are optional
.s3Prefix("s3Prefix")
.build())
.maxConcurrency("maxConcurrency")
.maxErrors("maxErrors")
.name("name")
.serviceRoleArn("serviceRoleArn")
.targets(List.of(TargetProperty.builder()
.key("key")
.values(List.of("values"))
.build()))
.taskInvocationParameters(TaskInvocationParametersProperty.builder()
.maintenanceWindowAutomationParameters(MaintenanceWindowAutomationParametersProperty.builder()
.documentVersion("documentVersion")
.parameters(parameters)
.build())
.maintenanceWindowLambdaParameters(MaintenanceWindowLambdaParametersProperty.builder()
.clientContext("clientContext")
.payload("payload")
.qualifier("qualifier")
.build())
.maintenanceWindowRunCommandParameters(MaintenanceWindowRunCommandParametersProperty.builder()
.cloudWatchOutputConfig(CloudWatchOutputConfigProperty.builder()
.cloudWatchLogGroupName("cloudWatchLogGroupName")
.cloudWatchOutputEnabled(false)
.build())
.comment("comment")
.documentHash("documentHash")
.documentHashType("documentHashType")
.documentVersion("documentVersion")
.notificationConfig(NotificationConfigProperty.builder()
.notificationArn("notificationArn")
// the properties below are optional
.notificationEvents(List.of("notificationEvents"))
.notificationType("notificationType")
.build())
.outputS3BucketName("outputS3BucketName")
.outputS3KeyPrefix("outputS3KeyPrefix")
.parameters(parameters)
.serviceRoleArn("serviceRoleArn")
.timeoutSeconds(123)
.build())
.maintenanceWindowStepFunctionsParameters(MaintenanceWindowStepFunctionsParametersProperty.builder()
.input("input")
.name("name")
.build())
.build())
.taskParameters(taskParameters)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnMaintenanceWindowTask.static interfaceConfiguration options for sending command output to Amazon CloudWatch Logs.static interfaceTheLoggingInfoproperty type specifies information about the Amazon S3 bucket to write instance-level logs to.static interfaceTheMaintenanceWindowAutomationParametersproperty type specifies the parameters for anAUTOMATIONtask type for a maintenance window task in AWS Systems Manager .static interfaceTheMaintenanceWindowLambdaParametersproperty type specifies the parameters for aLAMBDAtask type for a maintenance window task in AWS Systems Manager .static interfaceTheMaintenanceWindowRunCommandParametersproperty type specifies the parameters for aRUN_COMMANDtask type for a maintenance window task in AWS Systems Manager .static interfaceTheMaintenanceWindowStepFunctionsParametersproperty type specifies the parameters for the execution of aSTEP_FUNCTIONStask in a Systems Manager maintenance window.static interfaceTheNotificationConfigproperty type specifies configurations for sending notifications for a maintenance window task in AWS Systems Manager .static interfaceTheTargetproperty type specifies targets (either instances or window target IDs).static interfaceTheTaskInvocationParametersproperty type specifies the task execution parameters for a maintenance window task in AWS Systems Manager .Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnMaintenanceWindowTask(Construct scope, String id, CfnMaintenanceWindowTaskProps props) Create a newAWS::SSM::MaintenanceWindowTask.protectedCfnMaintenanceWindowTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnMaintenanceWindowTask(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.A description of the task.Information about an Amazon S3 bucket to write Run Command task-level logs to.The maximum number of targets this task can be run for, in parallel.The maximum number of errors allowed before this task stops being scheduled.getName()The task name.The priority of the task in the maintenance window.The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.The targets, either instances or window target IDs.The resource that the task uses during execution.The parameters to pass to the task when it runs.The parameters to pass to the task when it runs.The type of task.The ID of the maintenance window where the task is registered.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCutoffBehavior(String value) The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.voidsetDescription(String value) A description of the task.voidsetLoggingInfo(IResolvable value) Information about an Amazon S3 bucket to write Run Command task-level logs to.voidInformation about an Amazon S3 bucket to write Run Command task-level logs to.voidsetMaxConcurrency(String value) The maximum number of targets this task can be run for, in parallel.voidsetMaxErrors(String value) The maximum number of errors allowed before this task stops being scheduled.voidThe task name.voidsetPriority(Number value) The priority of the task in the maintenance window.voidsetServiceRoleArn(String value) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.voidsetTargets(List<Object> value) The targets, either instances or window target IDs.voidsetTargets(IResolvable value) The targets, either instances or window target IDs.voidsetTaskArn(String value) The resource that the task uses during execution.voidThe parameters to pass to the task when it runs.voidThe parameters to pass to the task when it runs.voidsetTaskParameters(Object value) The parameters to pass to the task when it runs.voidsetTaskType(String value) The type of task.voidsetWindowId(String value) The ID of the maintenance window where the task is registered.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnMaintenanceWindowTask
protected CfnMaintenanceWindowTask(software.amazon.jsii.JsiiObjectRef objRef) -
CfnMaintenanceWindowTask
protected CfnMaintenanceWindowTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnMaintenanceWindowTask
@Stability(Stable) public CfnMaintenanceWindowTask(@NotNull Construct scope, @NotNull String id, @NotNull CfnMaintenanceWindowTaskProps props) Create a newAWS::SSM::MaintenanceWindowTask.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getPriority
The priority of the task in the maintenance window.The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.
-
setPriority
The priority of the task in the maintenance window.The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.
-
getTaskArn
The resource that the task uses during execution.For
RUN_COMMANDandAUTOMATIONtask types,TaskArnis the SSM document name or Amazon Resource Name (ARN).For
LAMBDAtasks,TaskArnis the function name or ARN.For
STEP_FUNCTIONStasks,TaskArnis the state machine ARN. -
setTaskArn
The resource that the task uses during execution.For
RUN_COMMANDandAUTOMATIONtask types,TaskArnis the SSM document name or Amazon Resource Name (ARN).For
LAMBDAtasks,TaskArnis the function name or ARN.For
STEP_FUNCTIONStasks,TaskArnis the state machine ARN. -
getTaskParameters
The parameters to pass to the task when it runs.TaskParametershas been deprecated. To specify parameters to pass to a task when it runs, instead use theParametersoption in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters . -
setTaskParameters
The parameters to pass to the task when it runs.TaskParametershas been deprecated. To specify parameters to pass to a task when it runs, instead use theParametersoption in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters . -
getTaskType
The type of task.Valid values:
RUN_COMMAND,AUTOMATION,LAMBDA,STEP_FUNCTIONS. -
setTaskType
The type of task.Valid values:
RUN_COMMAND,AUTOMATION,LAMBDA,STEP_FUNCTIONS. -
getWindowId
The ID of the maintenance window where the task is registered. -
setWindowId
The ID of the maintenance window where the task is registered. -
getCutoffBehavior
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. -
setCutoffBehavior
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. -
getDescription
A description of the task. -
setDescription
A description of the task. -
getLoggingInfo
Information about an Amazon S3 bucket to write Run Command task-level logs to.LoggingInfohas been deprecated. To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theOutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters . -
setLoggingInfo
Information about an Amazon S3 bucket to write Run Command task-level logs to.LoggingInfohas been deprecated. To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theOutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters . -
setLoggingInfo
@Stability(Stable) public void setLoggingInfo(@Nullable CfnMaintenanceWindowTask.LoggingInfoProperty value) Information about an Amazon S3 bucket to write Run Command task-level logs to.LoggingInfohas been deprecated. To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theOutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters . -
getMaxConcurrency
The maximum number of targets this task can be run for, in parallel.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of
1. This value doesn't affect the running of your task. -
setMaxConcurrency
The maximum number of targets this task can be run for, in parallel.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of
1. This value doesn't affect the running of your task. -
getMaxErrors
The maximum number of errors allowed before this task stops being scheduled.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of
1. This value doesn't affect the running of your task. -
setMaxErrors
The maximum number of errors allowed before this task stops being scheduled.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of
1. This value doesn't affect the running of your task. -
getName
The task name. -
setName
The task name. -
getServiceRoleArn
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks. -
setServiceRoleArn
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks. -
getTargets
The targets, either instances or window target IDs.- Specify instances using
Key=InstanceIds,Values= *instanceid1* , *instanceid2*. - Specify window target IDs using
Key=WindowTargetIds,Values= *window-target-id-1* , *window-target-id-2*.
- Specify instances using
-
setTargets
The targets, either instances or window target IDs.- Specify instances using
Key=InstanceIds,Values= *instanceid1* , *instanceid2*. - Specify window target IDs using
Key=WindowTargetIds,Values= *window-target-id-1* , *window-target-id-2*.
- Specify instances using
-
setTargets
The targets, either instances or window target IDs.- Specify instances using
Key=InstanceIds,Values= *instanceid1* , *instanceid2*. - Specify window target IDs using
Key=WindowTargetIds,Values= *window-target-id-1* , *window-target-id-2*.
- Specify instances using
-
getTaskInvocationParameters
The parameters to pass to the task when it runs.Populate only the fields that match the task type. All other fields should be empty.
When you update a maintenance window task that has options specified in
TaskInvocationParameters, you must provide again all theTaskInvocationParametersvalues that you want to retain. The values you do not specify again are removed. For example, suppose that when you registered a Run Command task, you specifiedTaskInvocationParametersvalues forComment,NotificationConfig, andOutputS3BucketName. If you update the maintenance window task and specify only a differentOutputS3BucketNamevalue, the values forCommentandNotificationConfigare removed. -
setTaskInvocationParameters
The parameters to pass to the task when it runs.Populate only the fields that match the task type. All other fields should be empty.
When you update a maintenance window task that has options specified in
TaskInvocationParameters, you must provide again all theTaskInvocationParametersvalues that you want to retain. The values you do not specify again are removed. For example, suppose that when you registered a Run Command task, you specifiedTaskInvocationParametersvalues forComment,NotificationConfig, andOutputS3BucketName. If you update the maintenance window task and specify only a differentOutputS3BucketNamevalue, the values forCommentandNotificationConfigare removed. -
setTaskInvocationParameters
@Stability(Stable) public void setTaskInvocationParameters(@Nullable CfnMaintenanceWindowTask.TaskInvocationParametersProperty value) The parameters to pass to the task when it runs.Populate only the fields that match the task type. All other fields should be empty.
When you update a maintenance window task that has options specified in
TaskInvocationParameters, you must provide again all theTaskInvocationParametersvalues that you want to retain. The values you do not specify again are removed. For example, suppose that when you registered a Run Command task, you specifiedTaskInvocationParametersvalues forComment,NotificationConfig, andOutputS3BucketName. If you update the maintenance window task and specify only a differentOutputS3BucketNamevalue, the values forCommentandNotificationConfigare removed.
-