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

Contains information about an IAM role, including all of the role's * policies.

See Also:

AWS * API Reference

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

The trust policy that grants permission to assume the role.

*/ inline const Aws::String& GetAssumeRolePolicyDocument() const{ return m_assumeRolePolicyDocument; } /** *

The trust policy that grants permission to assume the role.

*/ inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; } /** *

The trust policy that grants permission to assume the role.

*/ inline void SetAssumeRolePolicyDocument(const Aws::String& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; } /** *

The trust policy that grants permission to assume the role.

*/ inline void SetAssumeRolePolicyDocument(Aws::String&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::move(value); } /** *

The trust policy that grants permission to assume the role.

*/ inline void SetAssumeRolePolicyDocument(const char* value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument.assign(value); } /** *

The trust policy that grants permission to assume the role.

*/ inline AwsIamRoleDetails& WithAssumeRolePolicyDocument(const Aws::String& value) { SetAssumeRolePolicyDocument(value); return *this;} /** *

The trust policy that grants permission to assume the role.

*/ inline AwsIamRoleDetails& WithAssumeRolePolicyDocument(Aws::String&& value) { SetAssumeRolePolicyDocument(std::move(value)); return *this;} /** *

The trust policy that grants permission to assume the role.

*/ inline AwsIamRoleDetails& WithAssumeRolePolicyDocument(const char* value) { SetAssumeRolePolicyDocument(value); return *this;} /** *

The list of the managed policies that are attached to the role.

*/ inline const Aws::Vector& GetAttachedManagedPolicies() const{ return m_attachedManagedPolicies; } /** *

The list of the managed policies that are attached to the role.

*/ inline bool AttachedManagedPoliciesHasBeenSet() const { return m_attachedManagedPoliciesHasBeenSet; } /** *

The list of the managed policies that are attached to the role.

*/ inline void SetAttachedManagedPolicies(const Aws::Vector& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies = value; } /** *

The list of the managed policies that are attached to the role.

*/ inline void SetAttachedManagedPolicies(Aws::Vector&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies = std::move(value); } /** *

The list of the managed policies that are attached to the role.

*/ inline AwsIamRoleDetails& WithAttachedManagedPolicies(const Aws::Vector& value) { SetAttachedManagedPolicies(value); return *this;} /** *

The list of the managed policies that are attached to the role.

*/ inline AwsIamRoleDetails& WithAttachedManagedPolicies(Aws::Vector&& value) { SetAttachedManagedPolicies(std::move(value)); return *this;} /** *

The list of the managed policies that are attached to the role.

*/ inline AwsIamRoleDetails& AddAttachedManagedPolicies(const AwsIamAttachedManagedPolicy& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies.push_back(value); return *this; } /** *

The list of the managed policies that are attached to the role.

*/ inline AwsIamRoleDetails& AddAttachedManagedPolicies(AwsIamAttachedManagedPolicy&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies.push_back(std::move(value)); return *this; } /** *

Indicates when the role 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; } /** *

Indicates when the role 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; } /** *

Indicates when the role 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; } /** *

Indicates when the role 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); } /** *

Indicates when the role 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); } /** *

Indicates when the role 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 AwsIamRoleDetails& WithCreateDate(const Aws::String& value) { SetCreateDate(value); return *this;} /** *

Indicates when the role 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 AwsIamRoleDetails& WithCreateDate(Aws::String&& value) { SetCreateDate(std::move(value)); return *this;} /** *

Indicates when the role 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 AwsIamRoleDetails& WithCreateDate(const char* value) { SetCreateDate(value); return *this;} /** *

The list of instance profiles that contain this role.

*/ inline const Aws::Vector& GetInstanceProfileList() const{ return m_instanceProfileList; } /** *

The list of instance profiles that contain this role.

*/ inline bool InstanceProfileListHasBeenSet() const { return m_instanceProfileListHasBeenSet; } /** *

The list of instance profiles that contain this role.

*/ inline void SetInstanceProfileList(const Aws::Vector& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList = value; } /** *

The list of instance profiles that contain this role.

*/ inline void SetInstanceProfileList(Aws::Vector&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList = std::move(value); } /** *

The list of instance profiles that contain this role.

*/ inline AwsIamRoleDetails& WithInstanceProfileList(const Aws::Vector& value) { SetInstanceProfileList(value); return *this;} /** *

The list of instance profiles that contain this role.

*/ inline AwsIamRoleDetails& WithInstanceProfileList(Aws::Vector&& value) { SetInstanceProfileList(std::move(value)); return *this;} /** *

The list of instance profiles that contain this role.

*/ inline AwsIamRoleDetails& AddInstanceProfileList(const AwsIamInstanceProfile& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList.push_back(value); return *this; } /** *

The list of instance profiles that contain this role.

*/ inline AwsIamRoleDetails& AddInstanceProfileList(AwsIamInstanceProfile&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList.push_back(std::move(value)); return *this; } inline const AwsIamPermissionsBoundary& GetPermissionsBoundary() const{ return m_permissionsBoundary; } inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; } inline void SetPermissionsBoundary(const AwsIamPermissionsBoundary& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = value; } inline void SetPermissionsBoundary(AwsIamPermissionsBoundary&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::move(value); } inline AwsIamRoleDetails& WithPermissionsBoundary(const AwsIamPermissionsBoundary& value) { SetPermissionsBoundary(value); return *this;} inline AwsIamRoleDetails& WithPermissionsBoundary(AwsIamPermissionsBoundary&& value) { SetPermissionsBoundary(std::move(value)); return *this;} /** *

The stable and unique string identifying the role.

*/ inline const Aws::String& GetRoleId() const{ return m_roleId; } /** *

The stable and unique string identifying the role.

*/ inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; } /** *

The stable and unique string identifying the role.

*/ inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; } /** *

The stable and unique string identifying the role.

*/ inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = std::move(value); } /** *

The stable and unique string identifying the role.

*/ inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); } /** *

The stable and unique string identifying the role.

*/ inline AwsIamRoleDetails& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;} /** *

The stable and unique string identifying the role.

*/ inline AwsIamRoleDetails& WithRoleId(Aws::String&& value) { SetRoleId(std::move(value)); return *this;} /** *

The stable and unique string identifying the role.

*/ inline AwsIamRoleDetails& WithRoleId(const char* value) { SetRoleId(value); return *this;} /** *

The friendly name that identifies the role.

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

The friendly name that identifies the role.

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

The friendly name that identifies the role.

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

The friendly name that identifies the role.

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

The friendly name that identifies the role.

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

The friendly name that identifies the role.

*/ inline AwsIamRoleDetails& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

The friendly name that identifies the role.

*/ inline AwsIamRoleDetails& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

The friendly name that identifies the role.

*/ inline AwsIamRoleDetails& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

The list of inline policies that are embedded in the role.

*/ inline const Aws::Vector& GetRolePolicyList() const{ return m_rolePolicyList; } /** *

The list of inline policies that are embedded in the role.

*/ inline bool RolePolicyListHasBeenSet() const { return m_rolePolicyListHasBeenSet; } /** *

The list of inline policies that are embedded in the role.

*/ inline void SetRolePolicyList(const Aws::Vector& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList = value; } /** *

The list of inline policies that are embedded in the role.

*/ inline void SetRolePolicyList(Aws::Vector&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList = std::move(value); } /** *

The list of inline policies that are embedded in the role.

*/ inline AwsIamRoleDetails& WithRolePolicyList(const Aws::Vector& value) { SetRolePolicyList(value); return *this;} /** *

The list of inline policies that are embedded in the role.

*/ inline AwsIamRoleDetails& WithRolePolicyList(Aws::Vector&& value) { SetRolePolicyList(std::move(value)); return *this;} /** *

The list of inline policies that are embedded in the role.

*/ inline AwsIamRoleDetails& AddRolePolicyList(const AwsIamRolePolicy& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList.push_back(value); return *this; } /** *

The list of inline policies that are embedded in the role.

*/ inline AwsIamRoleDetails& AddRolePolicyList(AwsIamRolePolicy&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList.push_back(std::move(value)); return *this; } /** *

The maximum session duration (in seconds) that you want to set for the * specified role.

*/ inline int GetMaxSessionDuration() const{ return m_maxSessionDuration; } /** *

The maximum session duration (in seconds) that you want to set for the * specified role.

*/ inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; } /** *

The maximum session duration (in seconds) that you want to set for the * specified role.

*/ inline void SetMaxSessionDuration(int value) { m_maxSessionDurationHasBeenSet = true; m_maxSessionDuration = value; } /** *

The maximum session duration (in seconds) that you want to set for the * specified role.

*/ inline AwsIamRoleDetails& WithMaxSessionDuration(int value) { SetMaxSessionDuration(value); return *this;} /** *

The path to the role.

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

The path to the role.

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

The path to the role.

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

The path to the role.

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

The path to the role.

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

The path to the role.

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

The path to the role.

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

The path to the role.

*/ inline AwsIamRoleDetails& WithPath(const char* value) { SetPath(value); return *this;} private: Aws::String m_assumeRolePolicyDocument; bool m_assumeRolePolicyDocumentHasBeenSet = false; Aws::Vector m_attachedManagedPolicies; bool m_attachedManagedPoliciesHasBeenSet = false; Aws::String m_createDate; bool m_createDateHasBeenSet = false; Aws::Vector m_instanceProfileList; bool m_instanceProfileListHasBeenSet = false; AwsIamPermissionsBoundary m_permissionsBoundary; bool m_permissionsBoundaryHasBeenSet = false; Aws::String m_roleId; bool m_roleIdHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; Aws::Vector m_rolePolicyList; bool m_rolePolicyListHasBeenSet = false; int m_maxSessionDuration; bool m_maxSessionDurationHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws