Class MaintenanceWindowTask
- java.lang.Object
-
- software.amazon.awssdk.services.ssm.model.MaintenanceWindowTask
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>
@Generated("software.amazon.awssdk:codegen") public final class MaintenanceWindowTask extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>
Information about a task defined for a maintenance window.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MaintenanceWindowTask.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlarmConfiguration
alarmConfiguration()
The details for the CloudWatch alarm applied to your maintenance window task.static MaintenanceWindowTask.Builder
builder()
MaintenanceWindowTaskCutoffBehavior
cutoffBehavior()
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.String
cutoffBehaviorAsString()
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.String
description()
A description of the task.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
boolean
hasTargets()
For responses, this returns true if the service returned a value for the Targets property.boolean
hasTaskParameters()
For responses, this returns true if the service returned a value for the TaskParameters property.LoggingInfo
loggingInfo()
Information about an S3 bucket to write task-level logs to.String
maxConcurrency()
The maximum number of targets this task can be run for, in parallel.String
maxErrors()
The maximum number of errors allowed before this task stops being scheduled.String
name()
The task name.Integer
priority()
The priority of the task in the maintenance window.List<SdkField<?>>
sdkFields()
static Class<? extends MaintenanceWindowTask.Builder>
serializableBuilderClass()
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.List<Target>
targets()
The targets (either managed nodes or tags).String
taskArn()
The resource that the task uses during execution.Map<String,MaintenanceWindowTaskParameterValueExpression>
taskParameters()
The parameters that should be passed to the task when it is run.MaintenanceWindowTask.Builder
toBuilder()
String
toString()
Returns a string representation of this object.MaintenanceWindowTaskType
type()
The type of task.String
typeAsString()
The type of task.String
windowId()
The ID of the maintenance window where the task is registered.String
windowTaskId()
The task ID.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
windowId
public final String windowId()
The ID of the maintenance window where the task is registered.
- Returns:
- The ID of the maintenance window where the task is registered.
-
windowTaskId
public final String windowTaskId()
The task ID.
- Returns:
- The task ID.
-
taskArn
public final 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.- Returns:
- 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.
-
type
public final MaintenanceWindowTaskType type()
The type of task.
If the service returns an enum value that is not available in the current SDK version,
type
will returnMaintenanceWindowTaskType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The type of task.
- See Also:
MaintenanceWindowTaskType
-
typeAsString
public final String typeAsString()
The type of task.
If the service returns an enum value that is not available in the current SDK version,
type
will returnMaintenanceWindowTaskType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The type of task.
- See Also:
MaintenanceWindowTaskType
-
hasTargets
public final boolean hasTargets()
For responses, this returns true if the service returned a value for the Targets property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
targets
public final List<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>
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTargets()
method.- Returns:
- 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>
.
-
hasTaskParameters
public final boolean hasTaskParameters()
For responses, this returns true if the service returned a value for the TaskParameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
taskParameters
public final 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.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTaskParameters()
method.- Returns:
- 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.
-
priority
public final 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.
- Returns:
- 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.
-
loggingInfo
public final 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.- Returns:
- 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.
-
serviceRoleArn
public final 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.
- Returns:
- 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.
-
maxConcurrency
public final 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.- Returns:
- 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.
-
maxErrors
public final 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.- Returns:
- 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.
-
name
public final String name()
The task name.
- Returns:
- The task name.
-
description
public final String description()
A description of the task.
- Returns:
- A description of the task.
-
cutoffBehavior
public final MaintenanceWindowTaskCutoffBehavior cutoffBehavior()
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
If the service returns an enum value that is not available in the current SDK version,
cutoffBehavior
will returnMaintenanceWindowTaskCutoffBehavior.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromcutoffBehaviorAsString()
.- Returns:
- The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
- See Also:
MaintenanceWindowTaskCutoffBehavior
-
cutoffBehaviorAsString
public final String cutoffBehaviorAsString()
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
If the service returns an enum value that is not available in the current SDK version,
cutoffBehavior
will returnMaintenanceWindowTaskCutoffBehavior.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromcutoffBehaviorAsString()
.- Returns:
- The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
- See Also:
MaintenanceWindowTaskCutoffBehavior
-
alarmConfiguration
public final AlarmConfiguration alarmConfiguration()
The details for the CloudWatch alarm applied to your maintenance window task.
- Returns:
- The details for the CloudWatch alarm applied to your maintenance window task.
-
toBuilder
public MaintenanceWindowTask.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<MaintenanceWindowTask.Builder,MaintenanceWindowTask>
-
builder
public static MaintenanceWindowTask.Builder builder()
-
serializableBuilderClass
public static Class<? extends MaintenanceWindowTask.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-