/* * 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; /** *
* Describes an association of a Amazon Web Services Systems Manager document (SSM document) and a managed node. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Association implements Serializable, Cloneable, StructuredPojo { /** ** The name of the SSM document. *
*/ private String name; /** ** The managed node ID. *
*/ private String instanceId; /** ** The ID created by the system when you create an association. An association is a binding between a document and a * set of targets with a schedule. *
*/ private String associationId; /** ** The association version. *
*/ private String associationVersion; /** *
* The version of the document used in the association. If you change a document version for a State Manager
* association, Systems Manager immediately runs the association unless you previously specifed the
* apply-only-at-cron-interval
parameter.
*
* State Manager doesn't support running associations that use a new version of a document if that document is
* shared from another account. State Manager always runs the default
version of a document if shared
* from another account, even though the Systems Manager console shows that a new version was processed. If you want
* to run an association using a new version of a document shared form another account, you must set the document
* version to default
.
*
* The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
* Web Services account by specifying the InstanceIds
key with a value of *
.
*
* The date on which the association was last run. *
*/ private java.util.Date lastExecutionDate; /** ** Information about the association. *
*/ private AssociationOverview overview; /** ** A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal * Time (UTC). *
*/ private String scheduleExpression; /** ** The association name. *
*/ private String associationName; /** ** Number of days to wait after the scheduled day to run an association. *
*/ private Integer scheduleOffset; /** ** A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified * together. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the SSM document. *
* * @param name * The name of the SSM document. */ public void setName(String name) { this.name = name; } /** ** The name of the SSM document. *
* * @return The name of the SSM document. */ public String getName() { return this.name; } /** ** The name of the SSM document. *
* * @param name * The name of the SSM document. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withName(String name) { setName(name); return this; } /** ** The managed node ID. *
* * @param instanceId * The managed node ID. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The managed node ID. *
* * @return The managed node ID. */ public String getInstanceId() { return this.instanceId; } /** ** The managed node ID. *
* * @param instanceId * The managed node ID. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** ** The ID created by the system when you create an association. An association is a binding between a document and a * set of targets with a schedule. *
* * @param associationId * The ID created by the system when you create an association. An association is a binding between a * document and a set of targets with a schedule. */ public void setAssociationId(String associationId) { this.associationId = associationId; } /** ** The ID created by the system when you create an association. An association is a binding between a document and a * set of targets with a schedule. *
* * @return The ID created by the system when you create an association. An association is a binding between a * document and a set of targets with a schedule. */ public String getAssociationId() { return this.associationId; } /** ** The ID created by the system when you create an association. An association is a binding between a document and a * set of targets with a schedule. *
* * @param associationId * The ID created by the system when you create an association. An association is a binding between a * document and a set of targets with a schedule. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withAssociationId(String associationId) { setAssociationId(associationId); return this; } /** ** The association version. *
* * @param associationVersion * The association version. */ public void setAssociationVersion(String associationVersion) { this.associationVersion = associationVersion; } /** ** The association version. *
* * @return The association version. */ public String getAssociationVersion() { return this.associationVersion; } /** ** The association version. *
* * @param associationVersion * The association version. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withAssociationVersion(String associationVersion) { setAssociationVersion(associationVersion); return this; } /** *
* The version of the document used in the association. If you change a document version for a State Manager
* association, Systems Manager immediately runs the association unless you previously specifed the
* apply-only-at-cron-interval
parameter.
*
* State Manager doesn't support running associations that use a new version of a document if that document is
* shared from another account. State Manager always runs the default
version of a document if shared
* from another account, even though the Systems Manager console shows that a new version was processed. If you want
* to run an association using a new version of a document shared form another account, you must set the document
* version to default
.
*
apply-only-at-cron-interval
parameter.
* State Manager doesn't support running associations that use a new version of a document if that document
* is shared from another account. State Manager always runs the default
version of a document
* if shared from another account, even though the Systems Manager console shows that a new version was
* processed. If you want to run an association using a new version of a document shared form another
* account, you must set the document version to default
.
*
* The version of the document used in the association. If you change a document version for a State Manager
* association, Systems Manager immediately runs the association unless you previously specifed the
* apply-only-at-cron-interval
parameter.
*
* State Manager doesn't support running associations that use a new version of a document if that document is
* shared from another account. State Manager always runs the default
version of a document if shared
* from another account, even though the Systems Manager console shows that a new version was processed. If you want
* to run an association using a new version of a document shared form another account, you must set the document
* version to default
.
*
apply-only-at-cron-interval
parameter.
* State Manager doesn't support running associations that use a new version of a document if that document
* is shared from another account. State Manager always runs the default
version of a document
* if shared from another account, even though the Systems Manager console shows that a new version was
* processed. If you want to run an association using a new version of a document shared form another
* account, you must set the document version to default
.
*
* The version of the document used in the association. If you change a document version for a State Manager
* association, Systems Manager immediately runs the association unless you previously specifed the
* apply-only-at-cron-interval
parameter.
*
* State Manager doesn't support running associations that use a new version of a document if that document is
* shared from another account. State Manager always runs the default
version of a document if shared
* from another account, even though the Systems Manager console shows that a new version was processed. If you want
* to run an association using a new version of a document shared form another account, you must set the document
* version to default
.
*
apply-only-at-cron-interval
parameter.
* State Manager doesn't support running associations that use a new version of a document if that document
* is shared from another account. State Manager always runs the default
version of a document
* if shared from another account, even though the Systems Manager console shows that a new version was
* processed. If you want to run an association using a new version of a document shared form another
* account, you must set the document version to default
.
*
* The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
* Web Services account by specifying the InstanceIds
key with a value of *
.
*
InstanceIds
key with a value of
* *
.
*/
public java.util.List
* The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
* Web Services account by specifying the InstanceIds
key with a value of *
.
*
InstanceIds
key with a value of *
.
*/
public void setTargets(java.util.Collection
* The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
* Web Services account by specifying the InstanceIds
key with a value of *
.
*
* 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. *
* * @param targets * The managed nodes targeted by the request to create an association. You can target all managed nodes in an * Amazon Web Services account by specifying theInstanceIds
key with a value of *
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Association withTargets(Target... targets) {
if (this.targets == null) {
setTargets(new com.amazonaws.internal.SdkInternalList
* The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
* Web Services account by specifying the InstanceIds
key with a value of *
.
*
InstanceIds
key with a value of *
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Association withTargets(java.util.Collection* The date on which the association was last run. *
* * @param lastExecutionDate * The date on which the association was last run. */ public void setLastExecutionDate(java.util.Date lastExecutionDate) { this.lastExecutionDate = lastExecutionDate; } /** ** The date on which the association was last run. *
* * @return The date on which the association was last run. */ public java.util.Date getLastExecutionDate() { return this.lastExecutionDate; } /** ** The date on which the association was last run. *
* * @param lastExecutionDate * The date on which the association was last run. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withLastExecutionDate(java.util.Date lastExecutionDate) { setLastExecutionDate(lastExecutionDate); return this; } /** ** Information about the association. *
* * @param overview * Information about the association. */ public void setOverview(AssociationOverview overview) { this.overview = overview; } /** ** Information about the association. *
* * @return Information about the association. */ public AssociationOverview getOverview() { return this.overview; } /** ** Information about the association. *
* * @param overview * Information about the association. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withOverview(AssociationOverview overview) { setOverview(overview); return this; } /** ** A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal * Time (UTC). *
* * @param scheduleExpression * A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated * Universal Time (UTC). */ public void setScheduleExpression(String scheduleExpression) { this.scheduleExpression = scheduleExpression; } /** ** A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal * Time (UTC). *
* * @return A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated * Universal Time (UTC). */ public String getScheduleExpression() { return this.scheduleExpression; } /** ** A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal * Time (UTC). *
* * @param scheduleExpression * A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated * Universal Time (UTC). * @return Returns a reference to this object so that method calls can be chained together. */ public Association withScheduleExpression(String scheduleExpression) { setScheduleExpression(scheduleExpression); return this; } /** ** The association name. *
* * @param associationName * The association name. */ public void setAssociationName(String associationName) { this.associationName = associationName; } /** ** The association name. *
* * @return The association name. */ public String getAssociationName() { return this.associationName; } /** ** The association name. *
* * @param associationName * The association name. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withAssociationName(String associationName) { setAssociationName(associationName); return this; } /** ** Number of days to wait after the scheduled day to run an association. *
* * @param scheduleOffset * Number of days to wait after the scheduled day to run an association. */ public void setScheduleOffset(Integer scheduleOffset) { this.scheduleOffset = scheduleOffset; } /** ** Number of days to wait after the scheduled day to run an association. *
* * @return Number of days to wait after the scheduled day to run an association. */ public Integer getScheduleOffset() { return this.scheduleOffset; } /** ** Number of days to wait after the scheduled day to run an association. *
* * @param scheduleOffset * Number of days to wait after the scheduled day to run an association. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withScheduleOffset(Integer scheduleOffset) { setScheduleOffset(scheduleOffset); return this; } /** ** A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified * together. *
* * @return A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be * specified together. */ public java.util.List* A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified * together. *
* * @param targetMaps * A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be * specified together. */ public void setTargetMaps(java.util.Collection* A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified * together. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTargetMaps(java.util.Collection)} or {@link #withTargetMaps(java.util.Collection)} if you want to * override the existing values. *
* * @param targetMaps * A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be * specified together. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withTargetMaps(java.util.Map* A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified * together. *
* * @param targetMaps * A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be * specified together. * @return Returns a reference to this object so that method calls can be chained together. */ public Association withTargetMaps(java.util.Collection