AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreatePolicyRequest.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 CreatePolicyRequest() = 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 "CreatePolicy"; }
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
44 inline const Aws::String& GetPolicyName() const { return m_policyName; }
45 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
46 template <typename PolicyNameT = Aws::String>
47 void SetPolicyName(PolicyNameT&& value) {
48 m_policyNameHasBeenSet = true;
49 m_policyName = std::forward<PolicyNameT>(value);
50 }
51 template <typename PolicyNameT = Aws::String>
52 CreatePolicyRequest& WithPolicyName(PolicyNameT&& value) {
53 SetPolicyName(std::forward<PolicyNameT>(value));
54 return *this;
55 }
57
59
72 inline const Aws::String& GetPath() const { return m_path; }
73 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
74 template <typename PathT = Aws::String>
75 void SetPath(PathT&& value) {
76 m_pathHasBeenSet = true;
77 m_path = std::forward<PathT>(value);
78 }
79 template <typename PathT = Aws::String>
80 CreatePolicyRequest& WithPath(PathT&& value) {
81 SetPath(std::forward<PathT>(value));
82 return *this;
83 }
85
87
110 inline const Aws::String& GetPolicyDocument() const { return m_policyDocument; }
111 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
112 template <typename PolicyDocumentT = Aws::String>
113 void SetPolicyDocument(PolicyDocumentT&& value) {
114 m_policyDocumentHasBeenSet = true;
115 m_policyDocument = std::forward<PolicyDocumentT>(value);
116 }
117 template <typename PolicyDocumentT = Aws::String>
118 CreatePolicyRequest& WithPolicyDocument(PolicyDocumentT&& value) {
119 SetPolicyDocument(std::forward<PolicyDocumentT>(value));
120 return *this;
121 }
123
125
131 inline const Aws::String& GetDescription() const { return m_description; }
132 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
133 template <typename DescriptionT = Aws::String>
134 void SetDescription(DescriptionT&& value) {
135 m_descriptionHasBeenSet = true;
136 m_description = std::forward<DescriptionT>(value);
137 }
138 template <typename DescriptionT = Aws::String>
139 CreatePolicyRequest& WithDescription(DescriptionT&& value) {
140 SetDescription(std::forward<DescriptionT>(value));
141 return *this;
142 }
144
146
155 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
156 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
157 template <typename TagsT = Aws::Vector<Tag>>
158 void SetTags(TagsT&& value) {
159 m_tagsHasBeenSet = true;
160 m_tags = std::forward<TagsT>(value);
161 }
162 template <typename TagsT = Aws::Vector<Tag>>
164 SetTags(std::forward<TagsT>(value));
165 return *this;
166 }
167 template <typename TagsT = Tag>
168 CreatePolicyRequest& AddTags(TagsT&& value) {
169 m_tagsHasBeenSet = true;
170 m_tags.emplace_back(std::forward<TagsT>(value));
171 return *this;
172 }
174 private:
175 Aws::String m_policyName;
176
177 Aws::String m_path;
178
179 Aws::String m_policyDocument;
180
181 Aws::String m_description;
182
183 Aws::Vector<Tag> m_tags;
184 bool m_policyNameHasBeenSet = false;
185 bool m_pathHasBeenSet = false;
186 bool m_policyDocumentHasBeenSet = false;
187 bool m_descriptionHasBeenSet = false;
188 bool m_tagsHasBeenSet = false;
189};
190
191} // namespace Model
192} // namespace IAM
193} // namespace Aws
CreatePolicyRequest & WithDescription(DescriptionT &&value)
CreatePolicyRequest & WithPolicyDocument(PolicyDocumentT &&value)
void SetPolicyName(PolicyNameT &&value)
virtual const char * GetServiceRequestName() const override
CreatePolicyRequest & WithPath(PathT &&value)
CreatePolicyRequest & WithPolicyName(PolicyNameT &&value)
const Aws::String & GetPolicyName() const
CreatePolicyRequest & WithTags(TagsT &&value)
AWS_IAM_API CreatePolicyRequest()=default
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetPolicyDocument() const
void SetDescription(DescriptionT &&value)
const Aws::String & GetPath() const
const Aws::String & GetDescription() const
AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWS_IAM_API Aws::String SerializePayload() const override
void SetPolicyDocument(PolicyDocumentT &&value)
CreatePolicyRequest & AddTags(TagsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector