AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Role.h
1
6#pragma once
7#include <aws/iam/IAM_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/iam/model/AttachedPermissionsBoundary.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/iam/model/RoleLastUsed.h>
14#include <aws/iam/model/Tag.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace IAM
27{
28namespace Model
29{
30
38 class Role
39 {
40 public:
41 AWS_IAM_API Role() = default;
42 AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode& xmlNode);
43 AWS_IAM_API Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
47
48
50
55 inline const Aws::String& GetPath() const { return m_path; }
56 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
57 template<typename PathT = Aws::String>
58 void SetPath(PathT&& value) { m_pathHasBeenSet = true; m_path = std::forward<PathT>(value); }
59 template<typename PathT = Aws::String>
60 Role& WithPath(PathT&& value) { SetPath(std::forward<PathT>(value)); return *this;}
62
64
67 inline const Aws::String& GetRoleName() const { return m_roleName; }
68 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
69 template<typename RoleNameT = Aws::String>
70 void SetRoleName(RoleNameT&& value) { m_roleNameHasBeenSet = true; m_roleName = std::forward<RoleNameT>(value); }
71 template<typename RoleNameT = Aws::String>
72 Role& WithRoleName(RoleNameT&& value) { SetRoleName(std::forward<RoleNameT>(value)); return *this;}
74
76
82 inline const Aws::String& GetRoleId() const { return m_roleId; }
83 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
84 template<typename RoleIdT = Aws::String>
85 void SetRoleId(RoleIdT&& value) { m_roleIdHasBeenSet = true; m_roleId = std::forward<RoleIdT>(value); }
86 template<typename RoleIdT = Aws::String>
87 Role& WithRoleId(RoleIdT&& value) { SetRoleId(std::forward<RoleIdT>(value)); return *this;}
89
91
97 inline const Aws::String& GetArn() const { return m_arn; }
98 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
99 template<typename ArnT = Aws::String>
100 void SetArn(ArnT&& value) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
101 template<typename ArnT = Aws::String>
102 Role& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
104
106
110 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
111 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
112 template<typename CreateDateT = Aws::Utils::DateTime>
113 void SetCreateDate(CreateDateT&& value) { m_createDateHasBeenSet = true; m_createDate = std::forward<CreateDateT>(value); }
114 template<typename CreateDateT = Aws::Utils::DateTime>
115 Role& WithCreateDate(CreateDateT&& value) { SetCreateDate(std::forward<CreateDateT>(value)); return *this;}
117
119
122 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
123 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
124 template<typename AssumeRolePolicyDocumentT = Aws::String>
125 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value); }
126 template<typename AssumeRolePolicyDocumentT = Aws::String>
127 Role& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value)); return *this;}
129
131
134 inline const Aws::String& GetDescription() const { return m_description; }
135 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
136 template<typename DescriptionT = Aws::String>
137 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
138 template<typename DescriptionT = Aws::String>
139 Role& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
141
143
149 inline int GetMaxSessionDuration() const { return m_maxSessionDuration; }
150 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
151 inline void SetMaxSessionDuration(int value) { m_maxSessionDurationHasBeenSet = true; m_maxSessionDuration = value; }
152 inline Role& WithMaxSessionDuration(int value) { SetMaxSessionDuration(value); return *this;}
154
156
162 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
163 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
164 template<typename PermissionsBoundaryT = AttachedPermissionsBoundary>
165 void SetPermissionsBoundary(PermissionsBoundaryT&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value); }
166 template<typename PermissionsBoundaryT = AttachedPermissionsBoundary>
167 Role& WithPermissionsBoundary(PermissionsBoundaryT&& value) { SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value)); return *this;}
169
171
177 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
178 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
179 template<typename TagsT = Aws::Vector<Tag>>
180 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
181 template<typename TagsT = Aws::Vector<Tag>>
182 Role& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
183 template<typename TagsT = Tag>
184 Role& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
186
188
197 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
198 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
199 template<typename RoleLastUsedT = RoleLastUsed>
200 void SetRoleLastUsed(RoleLastUsedT&& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = std::forward<RoleLastUsedT>(value); }
201 template<typename RoleLastUsedT = RoleLastUsed>
202 Role& WithRoleLastUsed(RoleLastUsedT&& value) { SetRoleLastUsed(std::forward<RoleLastUsedT>(value)); return *this;}
204 private:
205
206 Aws::String m_path;
207 bool m_pathHasBeenSet = false;
208
209 Aws::String m_roleName;
210 bool m_roleNameHasBeenSet = false;
211
212 Aws::String m_roleId;
213 bool m_roleIdHasBeenSet = false;
214
215 Aws::String m_arn;
216 bool m_arnHasBeenSet = false;
217
218 Aws::Utils::DateTime m_createDate{};
219 bool m_createDateHasBeenSet = false;
220
221 Aws::String m_assumeRolePolicyDocument;
222 bool m_assumeRolePolicyDocumentHasBeenSet = false;
223
224 Aws::String m_description;
225 bool m_descriptionHasBeenSet = false;
226
227 int m_maxSessionDuration{0};
228 bool m_maxSessionDurationHasBeenSet = false;
229
230 AttachedPermissionsBoundary m_permissionsBoundary;
231 bool m_permissionsBoundaryHasBeenSet = false;
232
233 Aws::Vector<Tag> m_tags;
234 bool m_tagsHasBeenSet = false;
235
236 RoleLastUsed m_roleLastUsed;
237 bool m_roleLastUsedHasBeenSet = false;
238 };
239
240} // namespace Model
241} // namespace IAM
242} // namespace Aws
AWS_IAM_API Role & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool CreateDateHasBeenSet() const
Definition Role.h:111
bool PermissionsBoundaryHasBeenSet() const
Definition Role.h:163
void SetTags(TagsT &&value)
Definition Role.h:180
int GetMaxSessionDuration() const
Definition Role.h:149
void SetArn(ArnT &&value)
Definition Role.h:100
const Aws::String & GetAssumeRolePolicyDocument() const
Definition Role.h:122
Role & WithDescription(DescriptionT &&value)
Definition Role.h:139
bool RoleIdHasBeenSet() const
Definition Role.h:83
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:125
Role & WithPath(PathT &&value)
Definition Role.h:60
Role & WithCreateDate(CreateDateT &&value)
Definition Role.h:115
bool RoleLastUsedHasBeenSet() const
Definition Role.h:198
Role & WithRoleName(RoleNameT &&value)
Definition Role.h:72
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition Role.h:162
Role & WithTags(TagsT &&value)
Definition Role.h:182
const Aws::String & GetRoleId() const
Definition Role.h:82
bool PathHasBeenSet() const
Definition Role.h:56
Role & WithMaxSessionDuration(int value)
Definition Role.h:152
Role & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:167
bool TagsHasBeenSet() const
Definition Role.h:178
void SetMaxSessionDuration(int value)
Definition Role.h:151
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:165
void SetPath(PathT &&value)
Definition Role.h:58
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition Role.h:123
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetRoleName() const
Definition Role.h:67
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetRoleName(RoleNameT &&value)
Definition Role.h:70
const Aws::String & GetDescription() const
Definition Role.h:134
bool MaxSessionDurationHasBeenSet() const
Definition Role.h:150
const Aws::Vector< Tag > & GetTags() const
Definition Role.h:177
void SetCreateDate(CreateDateT &&value)
Definition Role.h:113
const Aws::String & GetArn() const
Definition Role.h:97
const RoleLastUsed & GetRoleLastUsed() const
Definition Role.h:197
Role & WithRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:202
const Aws::Utils::DateTime & GetCreateDate() const
Definition Role.h:110
void SetDescription(DescriptionT &&value)
Definition Role.h:137
AWS_IAM_API Role()=default
Role & WithRoleId(RoleIdT &&value)
Definition Role.h:87
bool RoleNameHasBeenSet() const
Definition Role.h:68
Role & AddTags(TagsT &&value)
Definition Role.h:184
void SetRoleId(RoleIdT &&value)
Definition Role.h:85
Role & WithArn(ArnT &&value)
Definition Role.h:102
bool ArnHasBeenSet() const
Definition Role.h:98
void SetRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:200
bool DescriptionHasBeenSet() const
Definition Role.h:135
Role & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:127
const Aws::String & GetPath() const
Definition Role.h:55
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream