Interface MaintenanceWindowTask.Builder

All Superinterfaces:
Buildable, CopyableBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>, SdkBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>, SdkPojo
Enclosing class:
MaintenanceWindowTask

public static interface MaintenanceWindowTask.Builder extends SdkPojo, CopyableBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>
  • Method Details

    • windowId

      The ID of the maintenance window where the task is registered.

      Parameters:
      windowId - The ID of the maintenance window where the task is registered.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • windowTaskId

      MaintenanceWindowTask.Builder windowTaskId(String windowTaskId)

      The task ID.

      Parameters:
      windowTaskId - The task ID.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • taskArn

      The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION task types, TaskArn is the Amazon Web Services Systems Manager (SSM document) name or ARN. For LAMBDA tasks, it's the function name or ARN. For STEP_FUNCTIONS tasks, it's the state machine ARN.

      Parameters:
      taskArn - The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION task types, TaskArn is the Amazon Web Services Systems Manager (SSM document) name or ARN. For LAMBDA tasks, it's the function name or ARN. For STEP_FUNCTIONS tasks, it's the state machine ARN.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      The type of task.

      Parameters:
      type - The type of task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of task.

      Parameters:
      type - The type of task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • targets

      The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

      Parameters:
      targets - The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • targets

      The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

      Parameters:
      targets - The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • targets

      The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

      This is a convenience method that creates an instance of the Target.Builder avoiding the need to create one manually via Target.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to targets(List<Target>).

      Parameters:
      targets - a consumer that will call methods on Target.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • taskParameters

      The parameters that should be passed to the task when it is run.

      TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

      Parameters:
      taskParameters - The parameters that should be passed to the task when it is run.

      TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • priority

      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.

      Parameters:
      priority - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • loggingInfo

      MaintenanceWindowTask.Builder loggingInfo(LoggingInfo loggingInfo)

      Information about an S3 bucket to write task-level logs to.

      LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

      Parameters:
      loggingInfo - Information about an S3 bucket to write task-level logs to.

      LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • loggingInfo

      default MaintenanceWindowTask.Builder loggingInfo(Consumer<LoggingInfo.Builder> loggingInfo)

      Information about an S3 bucket to write task-level logs to.

      LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

      This is a convenience method that creates an instance of the LoggingInfo.Builder avoiding the need to create one manually via LoggingInfo.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to loggingInfo(LoggingInfo).

      Parameters:
      loggingInfo - a consumer that will call methods on LoggingInfo.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • serviceRoleArn

      MaintenanceWindowTask.Builder serviceRoleArn(String serviceRoleArn)

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.

      Parameters:
      serviceRoleArn - The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxConcurrency

      MaintenanceWindowTask.Builder maxConcurrency(String maxConcurrency)

      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.

      Parameters:
      maxConcurrency - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxErrors

      MaintenanceWindowTask.Builder maxErrors(String maxErrors)

      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.

      Parameters:
      maxErrors - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      The task name.

      Parameters:
      name - The task name.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      MaintenanceWindowTask.Builder description(String description)

      A description of the task.

      Parameters:
      description - A description of the task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cutoffBehavior

      MaintenanceWindowTask.Builder cutoffBehavior(String cutoffBehavior)

      The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.

      Parameters:
      cutoffBehavior - The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • cutoffBehavior

      The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.

      Parameters:
      cutoffBehavior - The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • alarmConfiguration

      MaintenanceWindowTask.Builder alarmConfiguration(AlarmConfiguration alarmConfiguration)

      The details for the CloudWatch alarm applied to your maintenance window task.

      Parameters:
      alarmConfiguration - The details for the CloudWatch alarm applied to your maintenance window task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • alarmConfiguration

      default MaintenanceWindowTask.Builder alarmConfiguration(Consumer<AlarmConfiguration.Builder> alarmConfiguration)

      The details for the CloudWatch alarm applied to your maintenance window task.

      This is a convenience method that creates an instance of the AlarmConfiguration.Builder avoiding the need to create one manually via AlarmConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to alarmConfiguration(AlarmConfiguration).

      Parameters:
      alarmConfiguration - a consumer that will call methods on AlarmConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: