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

Defines an approval rule for a patch baseline.

See Also:

AWS API * Reference

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

The patch filter group that defines the criteria for the rule.

*/ inline const PatchFilterGroup& GetPatchFilterGroup() const{ return m_patchFilterGroup; } /** *

The patch filter group that defines the criteria for the rule.

*/ inline bool PatchFilterGroupHasBeenSet() const { return m_patchFilterGroupHasBeenSet; } /** *

The patch filter group that defines the criteria for the rule.

*/ inline void SetPatchFilterGroup(const PatchFilterGroup& value) { m_patchFilterGroupHasBeenSet = true; m_patchFilterGroup = value; } /** *

The patch filter group that defines the criteria for the rule.

*/ inline void SetPatchFilterGroup(PatchFilterGroup&& value) { m_patchFilterGroupHasBeenSet = true; m_patchFilterGroup = std::move(value); } /** *

The patch filter group that defines the criteria for the rule.

*/ inline PatchRule& WithPatchFilterGroup(const PatchFilterGroup& value) { SetPatchFilterGroup(value); return *this;} /** *

The patch filter group that defines the criteria for the rule.

*/ inline PatchRule& WithPatchFilterGroup(PatchFilterGroup&& value) { SetPatchFilterGroup(std::move(value)); return *this;} /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline const PatchComplianceLevel& GetComplianceLevel() const{ return m_complianceLevel; } /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline bool ComplianceLevelHasBeenSet() const { return m_complianceLevelHasBeenSet; } /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline void SetComplianceLevel(const PatchComplianceLevel& value) { m_complianceLevelHasBeenSet = true; m_complianceLevel = value; } /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline void SetComplianceLevel(PatchComplianceLevel&& value) { m_complianceLevelHasBeenSet = true; m_complianceLevel = std::move(value); } /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline PatchRule& WithComplianceLevel(const PatchComplianceLevel& value) { SetComplianceLevel(value); return *this;} /** *

A compliance severity level for all approved patches in a patch baseline.

*/ inline PatchRule& WithComplianceLevel(PatchComplianceLevel&& value) { SetComplianceLevel(std::move(value)); return *this;} /** *

The number of days after the release date of each patch matched by the rule * that the patch is marked as approved in the patch baseline. For example, a value * of 7 means that patches are approved seven days after they are * released. Not supported on Debian Server or Ubuntu Server.

*/ inline int GetApproveAfterDays() const{ return m_approveAfterDays; } /** *

The number of days after the release date of each patch matched by the rule * that the patch is marked as approved in the patch baseline. For example, a value * of 7 means that patches are approved seven days after they are * released. Not supported on Debian Server or Ubuntu Server.

*/ inline bool ApproveAfterDaysHasBeenSet() const { return m_approveAfterDaysHasBeenSet; } /** *

The number of days after the release date of each patch matched by the rule * that the patch is marked as approved in the patch baseline. For example, a value * of 7 means that patches are approved seven days after they are * released. Not supported on Debian Server or Ubuntu Server.

*/ inline void SetApproveAfterDays(int value) { m_approveAfterDaysHasBeenSet = true; m_approveAfterDays = value; } /** *

The number of days after the release date of each patch matched by the rule * that the patch is marked as approved in the patch baseline. For example, a value * of 7 means that patches are approved seven days after they are * released. Not supported on Debian Server or Ubuntu Server.

*/ inline PatchRule& WithApproveAfterDays(int value) { SetApproveAfterDays(value); return *this;} /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline const Aws::String& GetApproveUntilDate() const{ return m_approveUntilDate; } /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline bool ApproveUntilDateHasBeenSet() const { return m_approveUntilDateHasBeenSet; } /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline void SetApproveUntilDate(const Aws::String& value) { m_approveUntilDateHasBeenSet = true; m_approveUntilDate = value; } /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline void SetApproveUntilDate(Aws::String&& value) { m_approveUntilDateHasBeenSet = true; m_approveUntilDate = std::move(value); } /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline void SetApproveUntilDate(const char* value) { m_approveUntilDateHasBeenSet = true; m_approveUntilDate.assign(value); } /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline PatchRule& WithApproveUntilDate(const Aws::String& value) { SetApproveUntilDate(value); return *this;} /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline PatchRule& WithApproveUntilDate(Aws::String&& value) { SetApproveUntilDate(std::move(value)); return *this;} /** *

The cutoff date for auto approval of released patches. Any patches released * on or before this date are installed automatically. Not supported on Debian * Server or Ubuntu Server.

Enter dates in the format * YYYY-MM-DD. For example, 2021-12-31.

*/ inline PatchRule& WithApproveUntilDate(const char* value) { SetApproveUntilDate(value); return *this;} /** *

For managed nodes identified by the approval rule filters, enables a patch * baseline to apply non-security updates available in the specified repository. * The default value is false. Applies to Linux managed nodes * only.

*/ inline bool GetEnableNonSecurity() const{ return m_enableNonSecurity; } /** *

For managed nodes identified by the approval rule filters, enables a patch * baseline to apply non-security updates available in the specified repository. * The default value is false. Applies to Linux managed nodes * only.

*/ inline bool EnableNonSecurityHasBeenSet() const { return m_enableNonSecurityHasBeenSet; } /** *

For managed nodes identified by the approval rule filters, enables a patch * baseline to apply non-security updates available in the specified repository. * The default value is false. Applies to Linux managed nodes * only.

*/ inline void SetEnableNonSecurity(bool value) { m_enableNonSecurityHasBeenSet = true; m_enableNonSecurity = value; } /** *

For managed nodes identified by the approval rule filters, enables a patch * baseline to apply non-security updates available in the specified repository. * The default value is false. Applies to Linux managed nodes * only.

*/ inline PatchRule& WithEnableNonSecurity(bool value) { SetEnableNonSecurity(value); return *this;} private: PatchFilterGroup m_patchFilterGroup; bool m_patchFilterGroupHasBeenSet = false; PatchComplianceLevel m_complianceLevel; bool m_complianceLevelHasBeenSet = false; int m_approveAfterDays; bool m_approveAfterDaysHasBeenSet = false; Aws::String m_approveUntilDate; bool m_approveUntilDateHasBeenSet = false; bool m_enableNonSecurity; bool m_enableNonSecurityHasBeenSet = false; }; } // namespace Model } // namespace SSM } // namespace Aws