/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The target registered with the maintenance window. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class MaintenanceWindowTarget implements Serializable, Cloneable, StructuredPojo { /** ** The ID of the maintenance window to register the target with. *
*/ private String windowId; /** ** The ID of the target. *
*/ private String windowTargetId; /** ** The type of target that is being registered with the maintenance window. *
*/ private String resourceType; /** ** The targets, either managed nodes or tags. *
** Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
* Key=<tag name>,Values=<tag value>
.
*
* A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running * tasks for these targets in this maintenance window. *
*/ private String ownerInformation; /** ** The name for the maintenance window target. *
*/ private String name; /** ** A description for the target. *
*/ private String description; /** ** The ID of the maintenance window to register the target with. *
* * @param windowId * The ID of the maintenance window to register the target with. */ public void setWindowId(String windowId) { this.windowId = windowId; } /** ** The ID of the maintenance window to register the target with. *
* * @return The ID of the maintenance window to register the target with. */ public String getWindowId() { return this.windowId; } /** ** The ID of the maintenance window to register the target with. *
* * @param windowId * The ID of the maintenance window to register the target with. * @return Returns a reference to this object so that method calls can be chained together. */ public MaintenanceWindowTarget withWindowId(String windowId) { setWindowId(windowId); return this; } /** ** The ID of the target. *
* * @param windowTargetId * The ID of the target. */ public void setWindowTargetId(String windowTargetId) { this.windowTargetId = windowTargetId; } /** ** The ID of the target. *
* * @return The ID of the target. */ public String getWindowTargetId() { return this.windowTargetId; } /** ** The ID of the target. *
* * @param windowTargetId * The ID of the target. * @return Returns a reference to this object so that method calls can be chained together. */ public MaintenanceWindowTarget withWindowTargetId(String windowTargetId) { setWindowTargetId(windowTargetId); return this; } /** ** The type of target that is being registered with the maintenance window. *
* * @param resourceType * The type of target that is being registered with the maintenance window. * @see MaintenanceWindowResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** ** The type of target that is being registered with the maintenance window. *
* * @return The type of target that is being registered with the maintenance window. * @see MaintenanceWindowResourceType */ public String getResourceType() { return this.resourceType; } /** ** The type of target that is being registered with the maintenance window. *
* * @param resourceType * The type of target that is being registered with the maintenance window. * @return Returns a reference to this object so that method calls can be chained together. * @see MaintenanceWindowResourceType */ public MaintenanceWindowTarget withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** ** The type of target that is being registered with the maintenance window. *
* * @param resourceType * The type of target that is being registered with the maintenance window. * @see MaintenanceWindowResourceType */ public void setResourceType(MaintenanceWindowResourceType resourceType) { withResourceType(resourceType); } /** ** The type of target that is being registered with the maintenance window. *
* * @param resourceType * The type of target that is being registered with the maintenance window. * @return Returns a reference to this object so that method calls can be chained together. * @see MaintenanceWindowResourceType */ public MaintenanceWindowTarget withResourceType(MaintenanceWindowResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** ** The targets, either managed nodes or tags. *
** Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
* Key=<tag name>,Values=<tag value>
.
*
* Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
*
* The targets, either managed nodes or tags.
*
* Specify managed nodes using the following format:
*
*
* Tags are specified using the following format:
*
* Key=<tag name>,Values=<tag value>
.
*/
public java.util.ListKey=instanceids,Values=<instanceid1>,<instanceid2>
* Key=<tag name>,Values=<tag value>
.
*
* Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
*
* The targets, either managed nodes or tags.
*
* Specify managed nodes using the following format:
*
*
* Tags are specified using the following format:
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargets(java.util.Collection)} or {@link #withTargets(java.util.Collection)} if you want to override
* the existing values.
* Key=<tag name>,Values=<tag value>
.
*/
public void setTargets(java.util.CollectionKey=instanceids,Values=<instanceid1>,<instanceid2>
* Key=<tag name>,Values=<tag value>
.
*
* Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
*
* The targets, either managed nodes or tags.
*
* Specify managed nodes using the following format:
*
*
* Tags are specified using the following format:
*
* Key=<tag name>,Values=<tag value>
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MaintenanceWindowTarget withTargets(Target... targets) {
if (this.targets == null) {
setTargets(new com.amazonaws.internal.SdkInternalListKey=instanceids,Values=<instanceid1>,<instanceid2>
* Key=<tag name>,Values=<tag value>
.
*
* Specify managed nodes using the following format: *
*
* Key=instanceids,Values=<instanceid1>,<instanceid2>
*
* Tags are specified using the following format: *
*
*
* A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running
* tasks for these targets in this maintenance window.
*
* A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running
* tasks for these targets in this maintenance window.
*
* A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running
* tasks for these targets in this maintenance window.
*
* The name for the maintenance window target.
*
* The name for the maintenance window target.
*
* The name for the maintenance window target.
*
* A description for the target.
*
* A description for the target.
*
* A description for the target.
* Key=<tag name>,Values=<tag value>
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MaintenanceWindowTarget withTargets(java.util.Collection