AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateRoleRequest.h
1
6#pragma once
7#include <aws/iam/IAM_EXPORTS.h>
8#include <aws/iam/IAMRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iam/model/Tag.h>
12#include <utility>
13
14namespace Aws
15{
16namespace IAM
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_IAM_API CreateRoleRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateRole"; }
33
34 AWS_IAM_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38
39 public:
40
42
54 inline const Aws::String& GetPath() const { return m_path; }
55 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
56 template<typename PathT = Aws::String>
57 void SetPath(PathT&& value) { m_pathHasBeenSet = true; m_path = std::forward<PathT>(value); }
58 template<typename PathT = Aws::String>
59 CreateRoleRequest& WithPath(PathT&& value) { SetPath(std::forward<PathT>(value)); return *this;}
61
63
72 inline const Aws::String& GetRoleName() const { return m_roleName; }
73 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
74 template<typename RoleNameT = Aws::String>
75 void SetRoleName(RoleNameT&& value) { m_roleNameHasBeenSet = true; m_roleName = std::forward<RoleNameT>(value); }
76 template<typename RoleNameT = Aws::String>
77 CreateRoleRequest& WithRoleName(RoleNameT&& value) { SetRoleName(std::forward<RoleNameT>(value)); return *this;}
79
81
97 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
98 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
99 template<typename AssumeRolePolicyDocumentT = Aws::String>
100 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value); }
101 template<typename AssumeRolePolicyDocumentT = Aws::String>
102 CreateRoleRequest& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value)); return *this;}
104
106
109 inline const Aws::String& GetDescription() const { return m_description; }
110 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
111 template<typename DescriptionT = Aws::String>
112 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
113 template<typename DescriptionT = Aws::String>
114 CreateRoleRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
116
118
135 inline int GetMaxSessionDuration() const { return m_maxSessionDuration; }
136 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
137 inline void SetMaxSessionDuration(int value) { m_maxSessionDurationHasBeenSet = true; m_maxSessionDuration = value; }
138 inline CreateRoleRequest& WithMaxSessionDuration(int value) { SetMaxSessionDuration(value); return *this;}
140
142
154 inline const Aws::String& GetPermissionsBoundary() const { return m_permissionsBoundary; }
155 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
156 template<typename PermissionsBoundaryT = Aws::String>
157 void SetPermissionsBoundary(PermissionsBoundaryT&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value); }
158 template<typename PermissionsBoundaryT = Aws::String>
159 CreateRoleRequest& WithPermissionsBoundary(PermissionsBoundaryT&& value) { SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value)); return *this;}
161
163
171 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
172 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
173 template<typename TagsT = Aws::Vector<Tag>>
174 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
175 template<typename TagsT = Aws::Vector<Tag>>
176 CreateRoleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
177 template<typename TagsT = Tag>
178 CreateRoleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
180 private:
181
182 Aws::String m_path;
183 bool m_pathHasBeenSet = false;
184
185 Aws::String m_roleName;
186 bool m_roleNameHasBeenSet = false;
187
188 Aws::String m_assumeRolePolicyDocument;
189 bool m_assumeRolePolicyDocumentHasBeenSet = false;
190
191 Aws::String m_description;
192 bool m_descriptionHasBeenSet = false;
193
194 int m_maxSessionDuration{0};
195 bool m_maxSessionDurationHasBeenSet = false;
196
197 Aws::String m_permissionsBoundary;
198 bool m_permissionsBoundaryHasBeenSet = false;
199
200 Aws::Vector<Tag> m_tags;
201 bool m_tagsHasBeenSet = false;
202 };
203
204} // namespace Model
205} // namespace IAM
206} // 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)
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