Interface MaintenanceWindowTask.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<MaintenanceWindowTask.Builder,
,MaintenanceWindowTask> SdkBuilder<MaintenanceWindowTask.Builder,
,MaintenanceWindowTask> SdkPojo
- Enclosing class:
MaintenanceWindowTask
-
Method Summary
Modifier and TypeMethodDescriptiondefault MaintenanceWindowTask.Builder
alarmConfiguration
(Consumer<AlarmConfiguration.Builder> alarmConfiguration) The details for the CloudWatch alarm applied to your maintenance window task.alarmConfiguration
(AlarmConfiguration alarmConfiguration) The details for the CloudWatch alarm applied to your maintenance window task.cutoffBehavior
(String cutoffBehavior) The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.cutoffBehavior
(MaintenanceWindowTaskCutoffBehavior cutoffBehavior) The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.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.loggingInfo
(LoggingInfo loggingInfo) Information about an S3 bucket to write task-level logs to.maxConcurrency
(String maxConcurrency) 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.The task name.The priority of the task in the maintenance window.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.targets
(Collection<Target> targets) The targets (either managed nodes or tags).targets
(Consumer<Target.Builder>... targets) The targets (either managed nodes or tags).The targets (either managed nodes or tags).The resource that the task uses during execution.taskParameters
(Map<String, MaintenanceWindowTaskParameterValueExpression> taskParameters) The parameters that should be passed to the task when it is run.The type of task.The type of task.The ID of the maintenance window where the task is registered.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 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
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
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
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 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
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
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 totargets(List<Target>)
.- 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:
-
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
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
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
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:
-
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
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
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
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
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
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:
-