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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MaintenanceWindowTask.Builder
alarmConfiguration(Consumer<AlarmConfiguration.Builder> alarmConfiguration)
The details for the CloudWatch alarm applied to your maintenance window task.MaintenanceWindowTask.Builder
alarmConfiguration(AlarmConfiguration alarmConfiguration)
The details for the CloudWatch alarm applied to your maintenance window task.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.MaintenanceWindowTask.Builder
cutoffBehavior(MaintenanceWindowTaskCutoffBehavior cutoffBehavior)
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.MaintenanceWindowTask.Builder
description(String description)
A description of the task.default MaintenanceWindowTask.Builder
loggingInfo(Consumer<LoggingInfo.Builder> loggingInfo)
Information about an S3 bucket to write task-level logs to.MaintenanceWindowTask.Builder
loggingInfo(LoggingInfo loggingInfo)
Information about an S3 bucket to write task-level logs to.MaintenanceWindowTask.Builder
maxConcurrency(String maxConcurrency)
The maximum number of targets this task can be run for, in parallel.MaintenanceWindowTask.Builder
maxErrors(String maxErrors)
The maximum number of errors allowed before this task stops being scheduled.MaintenanceWindowTask.Builder
name(String name)
The task name.MaintenanceWindowTask.Builder
priority(Integer priority)
The priority of the task in the maintenance window.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.MaintenanceWindowTask.Builder
targets(Collection<Target> targets)
The targets (either managed nodes or tags).MaintenanceWindowTask.Builder
targets(Consumer<Target.Builder>... targets)
The targets (either managed nodes or tags).MaintenanceWindowTask.Builder
targets(Target... targets)
The targets (either managed nodes or tags).MaintenanceWindowTask.Builder
taskArn(String taskArn)
The resource that the task uses during execution.MaintenanceWindowTask.Builder
taskParameters(Map<String,MaintenanceWindowTaskParameterValueExpression> taskParameters)
The parameters that should be passed to the task when it is run.MaintenanceWindowTask.Builder
type(String type)
The type of task.MaintenanceWindowTask.Builder
type(MaintenanceWindowTaskType type)
The type of task.MaintenanceWindowTask.Builder
windowId(String windowId)
The ID of the maintenance window where the task is registered.MaintenanceWindowTask.Builder
windowTaskId(String windowTaskId)
The task ID.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
windowId
MaintenanceWindowTask.Builder windowId(String 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
MaintenanceWindowTask.Builder taskArn(String taskArn)
The resource that the task uses during execution. For
RUN_COMMAND
andAUTOMATION
task types,TaskArn
is the Amazon Web Services Systems Manager (SSM document) name or ARN. ForLAMBDA
tasks, it's the function name or ARN. ForSTEP_FUNCTIONS
tasks, it's the state machine ARN.- Parameters:
taskArn
- The resource that the task uses during execution. ForRUN_COMMAND
andAUTOMATION
task types,TaskArn
is the Amazon Web Services Systems Manager (SSM document) name or ARN. ForLAMBDA
tasks, it's the function name or ARN. ForSTEP_FUNCTIONS
tasks, it's the state machine ARN.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
type
MaintenanceWindowTask.Builder type(String 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:
MaintenanceWindowTaskType
,MaintenanceWindowTaskType
-
type
MaintenanceWindowTask.Builder type(MaintenanceWindowTaskType 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:
MaintenanceWindowTaskType
,MaintenanceWindowTaskType
-
targets
MaintenanceWindowTask.Builder targets(Collection<Target> targets)
The targets (either managed nodes or tags). Managed nodes are specified using
Key=instanceids,Values=<instanceid1>,<instanceid2>
. Tags are specified usingKey=<tag name>,Values=<tag value>
.- Parameters:
targets
- The targets (either managed nodes or tags). Managed nodes are specified usingKey=instanceids,Values=<instanceid1>,<instanceid2>
. Tags are specified usingKey=<tag name>,Values=<tag value>
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targets
MaintenanceWindowTask.Builder targets(Target... targets)
The targets (either managed nodes or tags). Managed nodes are specified using
Key=instanceids,Values=<instanceid1>,<instanceid2>
. Tags are specified usingKey=<tag name>,Values=<tag value>
.- Parameters:
targets
- The targets (either managed nodes or tags). Managed nodes are specified usingKey=instanceids,Values=<instanceid1>,<instanceid2>
. Tags are specified usingKey=<tag name>,Values=<tag value>
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targets
MaintenanceWindowTask.Builder targets(Consumer<Target.Builder>... targets)
The targets (either managed nodes or tags). Managed nodes are specified using
This is a convenience method that creates an instance of theKey=instanceids,Values=<instanceid1>,<instanceid2>
. Tags are specified usingKey=<tag name>,Values=<tag value>
.Target.Builder
avoiding the need to create one manually viaTarget.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#targets(List
.) - Parameters:
targets
- a consumer that will call methods onTarget.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#targets(java.util.Collection
)
-
taskParameters
MaintenanceWindowTask.Builder taskParameters(Map<String,MaintenanceWindowTaskParameterValueExpression> 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 theParameters
option in theTaskInvocationParameters
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 theParameters
option in theTaskInvocationParameters
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
MaintenanceWindowTask.Builder priority(Integer 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 theOutputS3BucketName
andOutputS3KeyPrefix
options in theTaskInvocationParameters
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 theOutputS3BucketName
andOutputS3KeyPrefix
options in theTaskInvocationParameters
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 theOutputS3BucketName
andOutputS3KeyPrefix
options in theTaskInvocationParameters
structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.LoggingInfo.Builder
avoiding the need to create one manually viaLoggingInfo.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tologgingInfo(LoggingInfo)
.- Parameters:
loggingInfo
- a consumer that will call methods onLoggingInfo.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
loggingInfo(LoggingInfo)
-
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
MaintenanceWindowTask.Builder name(String 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:
MaintenanceWindowTaskCutoffBehavior
,MaintenanceWindowTaskCutoffBehavior
-
cutoffBehavior
MaintenanceWindowTask.Builder cutoffBehavior(MaintenanceWindowTaskCutoffBehavior 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:
MaintenanceWindowTaskCutoffBehavior
,MaintenanceWindowTaskCutoffBehavior
-
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 theAlarmConfiguration.Builder
avoiding the need to create one manually viaAlarmConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toalarmConfiguration(AlarmConfiguration)
.- Parameters:
alarmConfiguration
- a consumer that will call methods onAlarmConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
alarmConfiguration(AlarmConfiguration)
-
-