Class CfnMaintenanceWindowTask

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:10.177Z") @Stability(Stable) public class CfnMaintenanceWindowTask extends CfnResource implements IInspectable
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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnMaintenanceWindowTaskProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getPriority

      @Stability(Stable) @NotNull public Number getPriority()
      The priority of the task in the maintenance window.
    • setPriority

      @Stability(Stable) public void setPriority(@NotNull Number value)
      The priority of the task in the maintenance window.
    • getTaskArn

      @Stability(Stable) @NotNull public String getTaskArn()
      The resource that the task uses during execution.
    • setTaskArn

      @Stability(Stable) public void setTaskArn(@NotNull String value)
      The resource that the task uses during execution.
    • getTaskType

      @Stability(Stable) @NotNull public String getTaskType()
      The type of task.
    • setTaskType

      @Stability(Stable) public void setTaskType(@NotNull String value)
      The type of task.
    • getWindowId

      @Stability(Stable) @NotNull public String getWindowId()
      The ID of the maintenance window where the task is registered.
    • setWindowId

      @Stability(Stable) public void setWindowId(@NotNull String value)
      The ID of the maintenance window where the task is registered.
    • getCutoffBehavior

      @Stability(Stable) @Nullable public String getCutoffBehavior()
      The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
    • setCutoffBehavior

      @Stability(Stable) public void setCutoffBehavior(@Nullable String value)
      The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the task.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the task.
    • getLoggingInfo

      @Stability(Stable) @Nullable public Object getLoggingInfo()
      Information about an Amazon S3 bucket to write Run Command task-level logs to.
    • setLoggingInfo

      @Stability(Stable) public void setLoggingInfo(@Nullable IResolvable value)
      Information about an Amazon S3 bucket to write Run Command task-level logs to.
    • setLoggingInfo

      @Stability(Stable) public void setLoggingInfo(@Nullable CfnMaintenanceWindowTask.LoggingInfoProperty value)
      Information about an Amazon S3 bucket to write Run Command task-level logs to.
    • getMaxConcurrency

      @Stability(Stable) @Nullable public String getMaxConcurrency()
      The maximum number of targets this task can be run for, in parallel.
    • setMaxConcurrency

      @Stability(Stable) public void setMaxConcurrency(@Nullable String value)
      The maximum number of targets this task can be run for, in parallel.
    • getMaxErrors

      @Stability(Stable) @Nullable public String getMaxErrors()
      The maximum number of errors allowed before this task stops being scheduled.
    • setMaxErrors

      @Stability(Stable) public void setMaxErrors(@Nullable String value)
      The maximum number of errors allowed before this task stops being scheduled.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The task name.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The task name.
    • getServiceRoleArn

      @Stability(Stable) @Nullable public String getServiceRoleArn()
      The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task.
    • setServiceRoleArn

      @Stability(Stable) public void setServiceRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task.
    • getTargets

      @Stability(Stable) @Nullable public Object getTargets()
      The targets, either instances or window target IDs.
    • setTargets

      @Stability(Stable) public void setTargets(@Nullable IResolvable value)
      The targets, either instances or window target IDs.
    • setTargets

      @Stability(Stable) public void setTargets(@Nullable List<Object> value)
      The targets, either instances or window target IDs.
    • getTaskInvocationParameters

      @Stability(Stable) @Nullable public Object getTaskInvocationParameters()
      The parameters to pass to the task when it runs.
    • setTaskInvocationParameters

      @Stability(Stable) public void setTaskInvocationParameters(@Nullable IResolvable value)
      The parameters to pass to the task when it runs.
    • setTaskInvocationParameters

      @Stability(Stable) public void setTaskInvocationParameters(@Nullable CfnMaintenanceWindowTask.TaskInvocationParametersProperty value)
      The parameters to pass to the task when it runs.
    • getTaskParameters

      @Stability(Stable) @Nullable public Object getTaskParameters()
      The parameters to pass to the task when it runs.
    • setTaskParameters

      @Stability(Stable) public void setTaskParameters(@Nullable Object value)
      The parameters to pass to the task when it runs.