@Generated(value="software.amazon.awssdk:codegen") public final class RegisterTargetWithMaintenanceWindowRequest extends SsmRequest implements ToCopyableBuilder<RegisterTargetWithMaintenanceWindowRequest.Builder,RegisterTargetWithMaintenanceWindowRequest>
Modifier and Type | Class and Description |
---|---|
static interface |
RegisterTargetWithMaintenanceWindowRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static RegisterTargetWithMaintenanceWindowRequest.Builder |
builder() |
String |
clientToken()
User-provided idempotency token.
|
String |
description()
An optional description for the target.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
boolean |
hasTargets()
Returns true if the Targets property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
String |
name()
An optional name for the target.
|
String |
ownerInformation()
User-provided value that will be included in any CloudWatch events raised while running tasks for these targets
in this maintenance window.
|
MaintenanceWindowResourceType |
resourceType()
The type of target being registered with the maintenance window.
|
String |
resourceTypeAsString()
The type of target being registered with the maintenance window.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends RegisterTargetWithMaintenanceWindowRequest.Builder> |
serializableBuilderClass() |
List<Target> |
targets()
The targets to register with the maintenance window.
|
RegisterTargetWithMaintenanceWindowRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
String |
windowId()
The ID of the maintenance window the target should be registered with.
|
overrideConfiguration
copy
public final String windowId()
The ID of the maintenance window the target should be registered with.
public final MaintenanceWindowResourceType resourceType()
The type of target being registered with the maintenance window.
If the service returns an enum value that is not available in the current SDK version, resourceType
will
return MaintenanceWindowResourceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from resourceTypeAsString()
.
MaintenanceWindowResourceType
public final String resourceTypeAsString()
The type of target being registered with the maintenance window.
If the service returns an enum value that is not available in the current SDK version, resourceType
will
return MaintenanceWindowResourceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from resourceTypeAsString()
.
MaintenanceWindowResourceType
public final boolean hasTargets()
public final List<Target> targets()
The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs.
If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.
You can specify targets using instance IDs, resource group names, or tags that have been applied to instances.
Example 1: Specify instance IDs
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Example 2: Use tag key-pairs applied to instances
Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2
Example 3: Use tag-keys applied to instances
Key=tag-key,Values=my-tag-key-1,my-tag-key-2
Example 4: Use resource group names
Key=resource-groups:Name,Values=resource-group-name
Example 5: Use filters for resource group types
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For Key=resource-groups:ResourceTypeFilters
, specify resource types in the following format
Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
For more information about these examples formats, including the best use case for each one, see Examples: Register targets with a maintenance window in the AWS Systems Manager User Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasTargets()
to see if a value was sent in this field.
If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.
You can specify targets using instance IDs, resource group names, or tags that have been applied to instances.
Example 1: Specify instance IDs
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Example 2: Use tag key-pairs applied to instances
Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2
Example 3: Use tag-keys applied to instances
Key=tag-key,Values=my-tag-key-1,my-tag-key-2
Example 4: Use resource group names
Key=resource-groups:Name,Values=resource-group-name
Example 5: Use filters for resource group types
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For Key=resource-groups:ResourceTypeFilters
, specify resource types in the following format
Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
For more information about these examples formats, including the best use case for each one, see Examples: Register targets with a maintenance window in the AWS Systems Manager User Guide.
public final String ownerInformation()
User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this maintenance window.
public final String name()
An optional name for the target.
public final String description()
An optional description for the target.
public final String clientToken()
User-provided idempotency token.
public RegisterTargetWithMaintenanceWindowRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<RegisterTargetWithMaintenanceWindowRequest.Builder,RegisterTargetWithMaintenanceWindowRequest>
toBuilder
in class SsmRequest
public static RegisterTargetWithMaintenanceWindowRequest.Builder builder()
public static Class<? extends RegisterTargetWithMaintenanceWindowRequest.Builder> serializableBuilderClass()
public final int hashCode()
hashCode
in class AwsRequest
public final boolean equals(Object obj)
equals
in class AwsRequest
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.