/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Contains information about a managed policy. This data type is used as
* a response element in the CreatePolicy, GetPolicy, and
* ListPolicies operations. For more information about managed
* policies, refer to Managed
* policies and inline policies in the IAM User Guide. See
* Also:
AWS API
* Reference
The friendly name (not ARN) identifying the policy.
*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *The friendly name (not ARN) identifying the policy.
*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *The friendly name (not ARN) identifying the policy.
*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *The friendly name (not ARN) identifying the policy.
*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *The friendly name (not ARN) identifying the policy.
*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *The friendly name (not ARN) identifying the policy.
*/ inline Policy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *The friendly name (not ARN) identifying the policy.
*/ inline Policy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *The friendly name (not ARN) identifying the policy.
*/ inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline const Aws::String& GetPolicyId() const{ return m_policyId; } /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} /** *The stable and unique string identifying the policy.
For more * information about IDs, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} inline const Aws::String& GetArn() const{ return m_arn; } inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } inline Policy& WithArn(const Aws::String& value) { SetArn(value); return *this;} inline Policy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} inline Policy& WithArn(const char* value) { SetArn(value); return *this;} /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline const Aws::String& GetPath() const{ return m_path; } /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *The path to the policy.
For more information about paths, see IAM * identifiers in the IAM User Guide.
*/ inline Policy& WithPath(const char* value) { SetPath(value); return *this;} /** *The identifier for the version of the policy that is set as the default * version.
*/ inline const Aws::String& GetDefaultVersionId() const{ return m_defaultVersionId; } /** *The identifier for the version of the policy that is set as the default * version.
*/ inline bool DefaultVersionIdHasBeenSet() const { return m_defaultVersionIdHasBeenSet; } /** *The identifier for the version of the policy that is set as the default * version.
*/ inline void SetDefaultVersionId(const Aws::String& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = value; } /** *The identifier for the version of the policy that is set as the default * version.
*/ inline void SetDefaultVersionId(Aws::String&& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = std::move(value); } /** *The identifier for the version of the policy that is set as the default * version.
*/ inline void SetDefaultVersionId(const char* value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId.assign(value); } /** *The identifier for the version of the policy that is set as the default * version.
*/ inline Policy& WithDefaultVersionId(const Aws::String& value) { SetDefaultVersionId(value); return *this;} /** *The identifier for the version of the policy that is set as the default * version.
*/ inline Policy& WithDefaultVersionId(Aws::String&& value) { SetDefaultVersionId(std::move(value)); return *this;} /** *The identifier for the version of the policy that is set as the default * version.
*/ inline Policy& WithDefaultVersionId(const char* value) { SetDefaultVersionId(value); return *this;} /** *The number of entities (users, groups, and roles) that the policy is attached * to.
*/ inline int GetAttachmentCount() const{ return m_attachmentCount; } /** *The number of entities (users, groups, and roles) that the policy is attached * to.
*/ inline bool AttachmentCountHasBeenSet() const { return m_attachmentCountHasBeenSet; } /** *The number of entities (users, groups, and roles) that the policy is attached * to.
*/ inline void SetAttachmentCount(int value) { m_attachmentCountHasBeenSet = true; m_attachmentCount = value; } /** *The number of entities (users, groups, and roles) that the policy is attached * to.
*/ inline Policy& WithAttachmentCount(int value) { SetAttachmentCount(value); return *this;} /** *The number of entities (users and roles) for which the policy is used to set * the permissions boundary.
For more information about permissions * boundaries, see Permissions * boundaries for IAM identities in the IAM User Guide.
*/ inline int GetPermissionsBoundaryUsageCount() const{ return m_permissionsBoundaryUsageCount; } /** *The number of entities (users and roles) for which the policy is used to set * the permissions boundary.
For more information about permissions * boundaries, see Permissions * boundaries for IAM identities in the IAM User Guide.
*/ inline bool PermissionsBoundaryUsageCountHasBeenSet() const { return m_permissionsBoundaryUsageCountHasBeenSet; } /** *The number of entities (users and roles) for which the policy is used to set * the permissions boundary.
For more information about permissions * boundaries, see Permissions * boundaries for IAM identities in the IAM User Guide.
*/ inline void SetPermissionsBoundaryUsageCount(int value) { m_permissionsBoundaryUsageCountHasBeenSet = true; m_permissionsBoundaryUsageCount = value; } /** *The number of entities (users and roles) for which the policy is used to set * the permissions boundary.
For more information about permissions * boundaries, see Permissions * boundaries for IAM identities in the IAM User Guide.
*/ inline Policy& WithPermissionsBoundaryUsageCount(int value) { SetPermissionsBoundaryUsageCount(value); return *this;} /** *Specifies whether the policy can be attached to an IAM user, group, or * role.
*/ inline bool GetIsAttachable() const{ return m_isAttachable; } /** *Specifies whether the policy can be attached to an IAM user, group, or * role.
*/ inline bool IsAttachableHasBeenSet() const { return m_isAttachableHasBeenSet; } /** *Specifies whether the policy can be attached to an IAM user, group, or * role.
*/ inline void SetIsAttachable(bool value) { m_isAttachableHasBeenSet = true; m_isAttachable = value; } /** *Specifies whether the policy can be attached to an IAM user, group, or * role.
*/ inline Policy& WithIsAttachable(bool value) { SetIsAttachable(value); return *this;} /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline Policy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline Policy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *A friendly description of the policy.
This element is included in the * response to the GetPolicy operation. It is not included in the response * to the ListPolicies operation.
*/ inline Policy& WithDescription(const char* value) { SetDescription(value); return *this;} /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; } /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; } /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline Policy& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;} /** *The date and time, in ISO 8601 * date-time format, when the policy was created.
*/ inline Policy& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;} /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; } /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; } /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; } /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); } /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline Policy& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;} /** *The date and time, in ISO 8601 * date-time format, when the policy was last updated.
When a policy has * only one version, this field contains the date and time when the policy was * created. When a policy has more than one version, this field contains the date * and time when the most recent policy version was created.
*/ inline Policy& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;} /** *A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline const Aws::VectorA list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline void SetTags(const Aws::VectorA list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline void SetTags(Aws::VectorA list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline Policy& WithTags(const Aws::VectorA list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline Policy& WithTags(Aws::VectorA list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline Policy& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.
*/ inline Policy& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyId; bool m_policyIdHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; Aws::String m_defaultVersionId; bool m_defaultVersionIdHasBeenSet = false; int m_attachmentCount; bool m_attachmentCountHasBeenSet = false; int m_permissionsBoundaryUsageCount; bool m_permissionsBoundaryUsageCountHasBeenSet = false; bool m_isAttachable; bool m_isAttachableHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet = false; Aws::Utils::DateTime m_updateDate; bool m_updateDateHasBeenSet = false; Aws::Vector