/** * 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 SecurityHub { namespace Model { /** *

Represents an IAM permissions policy.

See Also:

AWS * API Reference

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

The number of users, groups, and roles that the policy is attached to.

*/ inline int GetAttachmentCount() const{ return m_attachmentCount; } /** *

The number of users, groups, and roles that the policy is attached to.

*/ inline bool AttachmentCountHasBeenSet() const { return m_attachmentCountHasBeenSet; } /** *

The number of users, groups, and roles that the policy is attached to.

*/ inline void SetAttachmentCount(int value) { m_attachmentCountHasBeenSet = true; m_attachmentCount = value; } /** *

The number of users, groups, and roles that the policy is attached to.

*/ inline AwsIamPolicyDetails& WithAttachmentCount(int value) { SetAttachmentCount(value); return *this;} /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline const Aws::String& GetCreateDate() const{ return m_createDate; } /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateDate(const Aws::String& value) { m_createDateHasBeenSet = true; m_createDate = value; } /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateDate(Aws::String&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateDate(const char* value) { m_createDateHasBeenSet = true; m_createDate.assign(value); } /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithCreateDate(const Aws::String& value) { SetCreateDate(value); return *this;} /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithCreateDate(Aws::String&& value) { SetCreateDate(std::move(value)); return *this;} /** *

When the policy was created.

Uses the date-time format * specified in RFC 3339 * section 5.6, Internet Date/Time Format. The value cannot contain spaces, and * date and time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithCreateDate(const char* value) { SetCreateDate(value); return *this;} /** *

The identifier of the default version of the policy.

*/ inline const Aws::String& GetDefaultVersionId() const{ return m_defaultVersionId; } /** *

The identifier of the default version of the policy.

*/ inline bool DefaultVersionIdHasBeenSet() const { return m_defaultVersionIdHasBeenSet; } /** *

The identifier of the default version of the policy.

*/ inline void SetDefaultVersionId(const Aws::String& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = value; } /** *

The identifier of the default version of the policy.

*/ inline void SetDefaultVersionId(Aws::String&& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = std::move(value); } /** *

The identifier of the default version of the policy.

*/ inline void SetDefaultVersionId(const char* value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId.assign(value); } /** *

The identifier of the default version of the policy.

*/ inline AwsIamPolicyDetails& WithDefaultVersionId(const Aws::String& value) { SetDefaultVersionId(value); return *this;} /** *

The identifier of the default version of the policy.

*/ inline AwsIamPolicyDetails& WithDefaultVersionId(Aws::String&& value) { SetDefaultVersionId(std::move(value)); return *this;} /** *

The identifier of the default version of the policy.

*/ inline AwsIamPolicyDetails& WithDefaultVersionId(const char* value) { SetDefaultVersionId(value); return *this;} /** *

A description of the policy.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the policy.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the policy.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the policy.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the policy.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the policy.

*/ inline AwsIamPolicyDetails& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the policy.

*/ inline AwsIamPolicyDetails& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the policy.

*/ inline AwsIamPolicyDetails& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Whether the policy can be attached to a user, group, or role.

*/ inline bool GetIsAttachable() const{ return m_isAttachable; } /** *

Whether the policy can be attached to a user, group, or role.

*/ inline bool IsAttachableHasBeenSet() const { return m_isAttachableHasBeenSet; } /** *

Whether the policy can be attached to a user, group, or role.

*/ inline void SetIsAttachable(bool value) { m_isAttachableHasBeenSet = true; m_isAttachable = value; } /** *

Whether the policy can be attached to a user, group, or role.

*/ inline AwsIamPolicyDetails& WithIsAttachable(bool value) { SetIsAttachable(value); return *this;} /** *

The path to the policy.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The path to the policy.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The path to the policy.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The path to the policy.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The path to the policy.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The path to the policy.

*/ inline AwsIamPolicyDetails& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The path to the policy.

*/ inline AwsIamPolicyDetails& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The path to the policy.

*/ inline AwsIamPolicyDetails& WithPath(const char* value) { SetPath(value); return *this;} /** *

The number of users and roles that use the policy to set the permissions * boundary.

*/ inline int GetPermissionsBoundaryUsageCount() const{ return m_permissionsBoundaryUsageCount; } /** *

The number of users and roles that use the policy to set the permissions * boundary.

*/ inline bool PermissionsBoundaryUsageCountHasBeenSet() const { return m_permissionsBoundaryUsageCountHasBeenSet; } /** *

The number of users and roles that use the policy to set the permissions * boundary.

*/ inline void SetPermissionsBoundaryUsageCount(int value) { m_permissionsBoundaryUsageCountHasBeenSet = true; m_permissionsBoundaryUsageCount = value; } /** *

The number of users and roles that use the policy to set the permissions * boundary.

*/ inline AwsIamPolicyDetails& WithPermissionsBoundaryUsageCount(int value) { SetPermissionsBoundaryUsageCount(value); return *this;} /** *

The unique identifier of the policy.

*/ inline const Aws::String& GetPolicyId() const{ return m_policyId; } /** *

The unique identifier of the policy.

*/ inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } /** *

The unique identifier of the policy.

*/ inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } /** *

The unique identifier of the policy.

*/ inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } /** *

The unique identifier of the policy.

*/ inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } /** *

The unique identifier of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} /** *

The unique identifier of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} /** *

The unique identifier of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} /** *

The name of the policy.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the policy.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the policy.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the policy.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the policy.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

List of versions of the policy.

*/ inline const Aws::Vector& GetPolicyVersionList() const{ return m_policyVersionList; } /** *

List of versions of the policy.

*/ inline bool PolicyVersionListHasBeenSet() const { return m_policyVersionListHasBeenSet; } /** *

List of versions of the policy.

*/ inline void SetPolicyVersionList(const Aws::Vector& value) { m_policyVersionListHasBeenSet = true; m_policyVersionList = value; } /** *

List of versions of the policy.

*/ inline void SetPolicyVersionList(Aws::Vector&& value) { m_policyVersionListHasBeenSet = true; m_policyVersionList = std::move(value); } /** *

List of versions of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyVersionList(const Aws::Vector& value) { SetPolicyVersionList(value); return *this;} /** *

List of versions of the policy.

*/ inline AwsIamPolicyDetails& WithPolicyVersionList(Aws::Vector&& value) { SetPolicyVersionList(std::move(value)); return *this;} /** *

List of versions of the policy.

*/ inline AwsIamPolicyDetails& AddPolicyVersionList(const AwsIamPolicyVersion& value) { m_policyVersionListHasBeenSet = true; m_policyVersionList.push_back(value); return *this; } /** *

List of versions of the policy.

*/ inline AwsIamPolicyDetails& AddPolicyVersionList(AwsIamPolicyVersion&& value) { m_policyVersionListHasBeenSet = true; m_policyVersionList.push_back(std::move(value)); return *this; } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline const Aws::String& GetUpdateDate() const{ return m_updateDate; } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetUpdateDate(const Aws::String& value) { m_updateDateHasBeenSet = true; m_updateDate = value; } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetUpdateDate(Aws::String&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetUpdateDate(const char* value) { m_updateDateHasBeenSet = true; m_updateDate.assign(value); } /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithUpdateDate(const Aws::String& value) { SetUpdateDate(value); return *this;} /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithUpdateDate(Aws::String&& value) { SetUpdateDate(std::move(value)); return *this;} /** *

When the policy was most recently updated.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamPolicyDetails& WithUpdateDate(const char* value) { SetUpdateDate(value); return *this;} private: int m_attachmentCount; bool m_attachmentCountHasBeenSet = false; Aws::String m_createDate; bool m_createDateHasBeenSet = false; Aws::String m_defaultVersionId; bool m_defaultVersionIdHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; bool m_isAttachable; bool m_isAttachableHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; int m_permissionsBoundaryUsageCount; bool m_permissionsBoundaryUsageCountHasBeenSet = false; Aws::String m_policyId; bool m_policyIdHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::Vector m_policyVersionList; bool m_policyVersionListHasBeenSet = false; Aws::String m_updateDate; bool m_updateDateHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws