Class Association

java.lang.Object
software.amazon.awssdk.services.ssm.model.Association
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Association.Builder,Association>

@Generated("software.amazon.awssdk:codegen") public final class Association extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Association.Builder,Association>

Describes an association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.

See Also:
  • Method Details

    • name

      public final String name()

      The name of the SSM document.

      Returns:
      The name of the SSM document.
    • instanceId

      public final String instanceId()

      The managed node ID.

      Returns:
      The managed node ID.
    • associationId

      public final String 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.

      Returns:
      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.
    • associationVersion

      public final String associationVersion()

      The association version.

      Returns:
      The association version.
    • documentVersion

      public final String documentVersion()

      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.

      Returns:
      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.

    • 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 the isEmpty() 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 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 *.

      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 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 *.
    • lastExecutionDate

      public final Instant lastExecutionDate()

      The date on which the association was last run.

      Returns:
      The date on which the association was last run.
    • overview

      public final AssociationOverview overview()

      Information about the association.

      Returns:
      Information about the association.
    • scheduleExpression

      public final String scheduleExpression()

      A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).

      Returns:
      A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).
    • associationName

      public final String associationName()

      The association name.

      Returns:
      The association name.
    • scheduleOffset

      public final Integer scheduleOffset()

      Number of days to wait after the scheduled day to run an association.

      Returns:
      Number of days to wait after the scheduled day to run an association.
    • duration

      public final Integer duration()

      The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.

      Returns:
      The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
    • hasTargetMaps

      public final boolean hasTargetMaps()
      For responses, this returns true if the service returned a value for the TargetMaps property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
    • targetMaps

      public final List<Map<String,List<String>>> targetMaps()

      A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

      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 hasTargetMaps() method.

      Returns:
      A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
    • toBuilder

      public Association.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Association.Builder,Association>
      Returns:
      a builder for type T
    • builder

      public static Association.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Association.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an 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.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.