/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SSM { namespace Model { /** *

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

See Also:

AWS API * Reference

*/ class Association { public: AWS_SSM_API Association(); AWS_SSM_API Association(Aws::Utils::Json::JsonView jsonValue); AWS_SSM_API Association& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SSM_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the SSM document.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the SSM document.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the SSM document.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the SSM document.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the SSM document.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the SSM document.

*/ inline Association& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the SSM document.

*/ inline Association& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the SSM document.

*/ inline Association& WithName(const char* value) { SetName(value); return *this;} /** *

The managed node ID.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The managed node ID.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The managed node ID.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The managed node ID.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The managed node ID.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The managed node ID.

*/ inline Association& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The managed node ID.

*/ inline Association& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The managed node ID.

*/ inline Association& WithInstanceId(const char* value) { SetInstanceId(value); 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.

*/ inline const Aws::String& GetAssociationId() const{ return m_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.

*/ inline bool AssociationIdHasBeenSet() const { return m_associationIdHasBeenSet; } /** *

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.

*/ inline void SetAssociationId(const Aws::String& value) { m_associationIdHasBeenSet = true; m_associationId = value; } /** *

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.

*/ inline void SetAssociationId(Aws::String&& value) { m_associationIdHasBeenSet = true; m_associationId = std::move(value); } /** *

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.

*/ inline void SetAssociationId(const char* value) { m_associationIdHasBeenSet = true; m_associationId.assign(value); } /** *

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.

*/ inline Association& WithAssociationId(const Aws::String& value) { SetAssociationId(value); 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.

*/ inline Association& WithAssociationId(Aws::String&& value) { SetAssociationId(std::move(value)); 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.

*/ inline Association& WithAssociationId(const char* value) { SetAssociationId(value); return *this;} /** *

The association version.

*/ inline const Aws::String& GetAssociationVersion() const{ return m_associationVersion; } /** *

The association version.

*/ inline bool AssociationVersionHasBeenSet() const { return m_associationVersionHasBeenSet; } /** *

The association version.

*/ inline void SetAssociationVersion(const Aws::String& value) { m_associationVersionHasBeenSet = true; m_associationVersion = value; } /** *

The association version.

*/ inline void SetAssociationVersion(Aws::String&& value) { m_associationVersionHasBeenSet = true; m_associationVersion = std::move(value); } /** *

The association version.

*/ inline void SetAssociationVersion(const char* value) { m_associationVersionHasBeenSet = true; m_associationVersion.assign(value); } /** *

The association version.

*/ inline Association& WithAssociationVersion(const Aws::String& value) { SetAssociationVersion(value); return *this;} /** *

The association version.

*/ inline Association& WithAssociationVersion(Aws::String&& value) { SetAssociationVersion(std::move(value)); return *this;} /** *

The association version.

*/ inline Association& WithAssociationVersion(const char* value) { SetAssociationVersion(value); 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.

*/ inline const Aws::String& GetDocumentVersion() const{ return m_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.

*/ inline bool DocumentVersionHasBeenSet() const { return m_documentVersionHasBeenSet; } /** *

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.

*/ inline void SetDocumentVersion(const Aws::String& value) { m_documentVersionHasBeenSet = true; m_documentVersion = value; } /** *

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.

*/ inline void SetDocumentVersion(Aws::String&& value) { m_documentVersionHasBeenSet = true; m_documentVersion = std::move(value); } /** *

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.

*/ inline void SetDocumentVersion(const char* value) { m_documentVersionHasBeenSet = true; m_documentVersion.assign(value); } /** *

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.

*/ inline Association& WithDocumentVersion(const Aws::String& value) { SetDocumentVersion(value); 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.

*/ inline Association& WithDocumentVersion(Aws::String&& value) { SetDocumentVersion(std::move(value)); 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.

*/ inline Association& WithDocumentVersion(const char* value) { SetDocumentVersion(value); return *this;} /** *

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

*/ inline const Aws::Vector& GetTargets() const{ return m_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 *.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

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

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

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

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

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

*/ inline Association& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

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

*/ inline Association& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

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

*/ inline Association& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

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

*/ inline Association& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } /** *

The date on which the association was last run.

*/ inline const Aws::Utils::DateTime& GetLastExecutionDate() const{ return m_lastExecutionDate; } /** *

The date on which the association was last run.

*/ inline bool LastExecutionDateHasBeenSet() const { return m_lastExecutionDateHasBeenSet; } /** *

The date on which the association was last run.

*/ inline void SetLastExecutionDate(const Aws::Utils::DateTime& value) { m_lastExecutionDateHasBeenSet = true; m_lastExecutionDate = value; } /** *

The date on which the association was last run.

*/ inline void SetLastExecutionDate(Aws::Utils::DateTime&& value) { m_lastExecutionDateHasBeenSet = true; m_lastExecutionDate = std::move(value); } /** *

The date on which the association was last run.

*/ inline Association& WithLastExecutionDate(const Aws::Utils::DateTime& value) { SetLastExecutionDate(value); return *this;} /** *

The date on which the association was last run.

*/ inline Association& WithLastExecutionDate(Aws::Utils::DateTime&& value) { SetLastExecutionDate(std::move(value)); return *this;} /** *

Information about the association.

*/ inline const AssociationOverview& GetOverview() const{ return m_overview; } /** *

Information about the association.

*/ inline bool OverviewHasBeenSet() const { return m_overviewHasBeenSet; } /** *

Information about the association.

*/ inline void SetOverview(const AssociationOverview& value) { m_overviewHasBeenSet = true; m_overview = value; } /** *

Information about the association.

*/ inline void SetOverview(AssociationOverview&& value) { m_overviewHasBeenSet = true; m_overview = std::move(value); } /** *

Information about the association.

*/ inline Association& WithOverview(const AssociationOverview& value) { SetOverview(value); return *this;} /** *

Information about the association.

*/ inline Association& WithOverview(AssociationOverview&& value) { SetOverview(std::move(value)); return *this;} /** *

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

*/ inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; } /** *

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

*/ inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; } /** *

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

*/ inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; } /** *

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

*/ inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::move(value); } /** *

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

*/ inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); } /** *

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

*/ inline Association& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;} /** *

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

*/ inline Association& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(std::move(value)); return *this;} /** *

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

*/ inline Association& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;} /** *

The association name.

*/ inline const Aws::String& GetAssociationName() const{ return m_associationName; } /** *

The association name.

*/ inline bool AssociationNameHasBeenSet() const { return m_associationNameHasBeenSet; } /** *

The association name.

*/ inline void SetAssociationName(const Aws::String& value) { m_associationNameHasBeenSet = true; m_associationName = value; } /** *

The association name.

*/ inline void SetAssociationName(Aws::String&& value) { m_associationNameHasBeenSet = true; m_associationName = std::move(value); } /** *

The association name.

*/ inline void SetAssociationName(const char* value) { m_associationNameHasBeenSet = true; m_associationName.assign(value); } /** *

The association name.

*/ inline Association& WithAssociationName(const Aws::String& value) { SetAssociationName(value); return *this;} /** *

The association name.

*/ inline Association& WithAssociationName(Aws::String&& value) { SetAssociationName(std::move(value)); return *this;} /** *

The association name.

*/ inline Association& WithAssociationName(const char* value) { SetAssociationName(value); return *this;} /** *

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

*/ inline int GetScheduleOffset() const{ return m_scheduleOffset; } /** *

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

*/ inline bool ScheduleOffsetHasBeenSet() const { return m_scheduleOffsetHasBeenSet; } /** *

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

*/ inline void SetScheduleOffset(int value) { m_scheduleOffsetHasBeenSet = true; m_scheduleOffset = value; } /** *

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

*/ inline Association& WithScheduleOffset(int value) { SetScheduleOffset(value); return *this;} /** *

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

*/ inline const Aws::Vector>>& GetTargetMaps() const{ return m_targetMaps; } /** *

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

*/ inline bool TargetMapsHasBeenSet() const { return m_targetMapsHasBeenSet; } /** *

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

*/ inline void SetTargetMaps(const Aws::Vector>>& value) { m_targetMapsHasBeenSet = true; m_targetMaps = value; } /** *

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

*/ inline void SetTargetMaps(Aws::Vector>>&& value) { m_targetMapsHasBeenSet = true; m_targetMaps = std::move(value); } /** *

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

*/ inline Association& WithTargetMaps(const Aws::Vector>>& value) { SetTargetMaps(value); return *this;} /** *

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

*/ inline Association& WithTargetMaps(Aws::Vector>>&& value) { SetTargetMaps(std::move(value)); return *this;} /** *

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

*/ inline Association& AddTargetMaps(const Aws::Map>& value) { m_targetMapsHasBeenSet = true; m_targetMaps.push_back(value); return *this; } /** *

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

*/ inline Association& AddTargetMaps(Aws::Map>&& value) { m_targetMapsHasBeenSet = true; m_targetMaps.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_associationId; bool m_associationIdHasBeenSet = false; Aws::String m_associationVersion; bool m_associationVersionHasBeenSet = false; Aws::String m_documentVersion; bool m_documentVersionHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; Aws::Utils::DateTime m_lastExecutionDate; bool m_lastExecutionDateHasBeenSet = false; AssociationOverview m_overview; bool m_overviewHasBeenSet = false; Aws::String m_scheduleExpression; bool m_scheduleExpressionHasBeenSet = false; Aws::String m_associationName; bool m_associationNameHasBeenSet = false; int m_scheduleOffset; bool m_scheduleOffsetHasBeenSet = false; Aws::Vector>> m_targetMaps; bool m_targetMapsHasBeenSet = false; }; } // namespace Model } // namespace SSM } // namespace Aws