AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
CreateRoleRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iam/IAMRequest.h>
10#include <aws/iam/IAM_EXPORTS.h>
11#include <aws/iam/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace IAM {
17namespace Model {
18
22 public:
23 AWS_IAM_API CreateRoleRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateRole"; }
30
31 AWS_IAM_API Aws::String SerializePayload() const override;
32
33 protected:
34 AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
35
36 public:
38
50 inline const Aws::String& GetPath() const { return m_path; }
51 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
52 template <typename PathT = Aws::String>
53 void SetPath(PathT&& value) {
54 m_pathHasBeenSet = true;
55 m_path = std::forward<PathT>(value);
56 }
57 template <typename PathT = Aws::String>
58 CreateRoleRequest& WithPath(PathT&& value) {
59 SetPath(std::forward<PathT>(value));
60 return *this;
61 }
63
65
74 inline const Aws::String& GetRoleName() const { return m_roleName; }
75 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
76 template <typename RoleNameT = Aws::String>
77 void SetRoleName(RoleNameT&& value) {
78 m_roleNameHasBeenSet = true;
79 m_roleName = std::forward<RoleNameT>(value);
80 }
81 template <typename RoleNameT = Aws::String>
82 CreateRoleRequest& WithRoleName(RoleNameT&& value) {
83 SetRoleName(std::forward<RoleNameT>(value));
84 return *this;
85 }
87
89
105 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
106 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
107 template <typename AssumeRolePolicyDocumentT = Aws::String>
108 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
109 m_assumeRolePolicyDocumentHasBeenSet = true;
110 m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value);
111 }
112 template <typename AssumeRolePolicyDocumentT = Aws::String>
113 CreateRoleRequest& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
114 SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value));
115 return *this;
116 }
118
120
123 inline const Aws::String& GetDescription() const { return m_description; }
124 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
125 template <typename DescriptionT = Aws::String>
126 void SetDescription(DescriptionT&& value) {
127 m_descriptionHasBeenSet = true;
128 m_description = std::forward<DescriptionT>(value);
129 }
130 template <typename DescriptionT = Aws::String>
131 CreateRoleRequest& WithDescription(DescriptionT&& value) {
132 SetDescription(std::forward<DescriptionT>(value));
133 return *this;
134 }
136
138
155 inline int GetMaxSessionDuration() const { return m_maxSessionDuration; }
156 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
157 inline void SetMaxSessionDuration(int value) {
158 m_maxSessionDurationHasBeenSet = true;
159 m_maxSessionDuration = value;
160 }
163 return *this;
164 }
166
168
176 inline int GetMaxSigninSessionDuration() const { return m_maxSigninSessionDuration; }
177 inline bool MaxSigninSessionDurationHasBeenSet() const { return m_maxSigninSessionDurationHasBeenSet; }
178 inline void SetMaxSigninSessionDuration(int value) {
179 m_maxSigninSessionDurationHasBeenSet = true;
180 m_maxSigninSessionDuration = value;
181 }
184 return *this;
185 }
187
189
201 inline const Aws::String& GetPermissionsBoundary() const { return m_permissionsBoundary; }
202 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
203 template <typename PermissionsBoundaryT = Aws::String>
204 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
205 m_permissionsBoundaryHasBeenSet = true;
206 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
207 }
208 template <typename PermissionsBoundaryT = Aws::String>
209 CreateRoleRequest& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
210 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
211 return *this;
212 }
214
216
224 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
225 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
226 template <typename TagsT = Aws::Vector<Tag>>
227 void SetTags(TagsT&& value) {
228 m_tagsHasBeenSet = true;
229 m_tags = std::forward<TagsT>(value);
230 }
231 template <typename TagsT = Aws::Vector<Tag>>
232 CreateRoleRequest& WithTags(TagsT&& value) {
233 SetTags(std::forward<TagsT>(value));
234 return *this;
235 }
236 template <typename TagsT = Tag>
237 CreateRoleRequest& AddTags(TagsT&& value) {
238 m_tagsHasBeenSet = true;
239 m_tags.emplace_back(std::forward<TagsT>(value));
240 return *this;
241 }
243 private:
244 Aws::String m_path;
245
246 Aws::String m_roleName;
247
248 Aws::String m_assumeRolePolicyDocument;
249
250 Aws::String m_description;
251
252 int m_maxSessionDuration{0};
253
254 int m_maxSigninSessionDuration{0};
255
256 Aws::String m_permissionsBoundary;
257
258 Aws::Vector<Tag> m_tags;
259 bool m_pathHasBeenSet = false;
260 bool m_roleNameHasBeenSet = false;
261 bool m_assumeRolePolicyDocumentHasBeenSet = false;
262 bool m_descriptionHasBeenSet = false;
263 bool m_maxSessionDurationHasBeenSet = false;
264 bool m_maxSigninSessionDurationHasBeenSet = false;
265 bool m_permissionsBoundaryHasBeenSet = false;
266 bool m_tagsHasBeenSet = false;
267};
268
269} // namespace Model
270} // namespace IAM
271} // namespace Aws
CreateRoleRequest & AddTags(TagsT &&value)
CreateRoleRequest & WithTags(TagsT &&value)
CreateRoleRequest & WithRoleName(RoleNameT &&value)
const Aws::String & GetPath() const
const Aws::String & GetAssumeRolePolicyDocument() const
CreateRoleRequest & WithMaxSessionDuration(int value)
AWS_IAM_API CreateRoleRequest()=default
const Aws::Vector< Tag > & GetTags() const
void SetRoleName(RoleNameT &&value)
CreateRoleRequest & WithPath(PathT &&value)
virtual const char * GetServiceRequestName() const override
CreateRoleRequest & WithDescription(DescriptionT &&value)
CreateRoleRequest & WithMaxSigninSessionDuration(int value)
const Aws::String & GetDescription() const
AWS_IAM_API Aws::String SerializePayload() const override
CreateRoleRequest & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
CreateRoleRequest & WithPermissionsBoundary(PermissionsBoundaryT &&value)
const Aws::String & GetRoleName() const
const Aws::String & GetPermissionsBoundary() const
AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetDescription(DescriptionT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector