AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreatePolicyRequest.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 CreatePolicyRequest() = 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 "CreatePolicy"; }
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
48 inline const Aws::String& GetPolicyName() const { return m_policyName; }
49 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
50 template<typename PolicyNameT = Aws::String>
51 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet = true; m_policyName = std::forward<PolicyNameT>(value); }
52 template<typename PolicyNameT = Aws::String>
53 CreatePolicyRequest& WithPolicyName(PolicyNameT&& value) { SetPolicyName(std::forward<PolicyNameT>(value)); return *this;}
55
57
70 inline const Aws::String& GetPath() const { return m_path; }
71 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
72 template<typename PathT = Aws::String>
73 void SetPath(PathT&& value) { m_pathHasBeenSet = true; m_path = std::forward<PathT>(value); }
74 template<typename PathT = Aws::String>
75 CreatePolicyRequest& WithPath(PathT&& value) { SetPath(std::forward<PathT>(value)); return *this;}
77
79
102 inline const Aws::String& GetPolicyDocument() const { return m_policyDocument; }
103 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
104 template<typename PolicyDocumentT = Aws::String>
105 void SetPolicyDocument(PolicyDocumentT&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::forward<PolicyDocumentT>(value); }
106 template<typename PolicyDocumentT = Aws::String>
107 CreatePolicyRequest& WithPolicyDocument(PolicyDocumentT&& value) { SetPolicyDocument(std::forward<PolicyDocumentT>(value)); return *this;}
109
111
117 inline const Aws::String& GetDescription() const { return m_description; }
118 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
119 template<typename DescriptionT = Aws::String>
120 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
121 template<typename DescriptionT = Aws::String>
122 CreatePolicyRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
124
126
135 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
136 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
137 template<typename TagsT = Aws::Vector<Tag>>
138 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
139 template<typename TagsT = Aws::Vector<Tag>>
140 CreatePolicyRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
141 template<typename TagsT = Tag>
142 CreatePolicyRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
144 private:
145
146 Aws::String m_policyName;
147 bool m_policyNameHasBeenSet = false;
148
149 Aws::String m_path;
150 bool m_pathHasBeenSet = false;
151
152 Aws::String m_policyDocument;
153 bool m_policyDocumentHasBeenSet = false;
154
155 Aws::String m_description;
156 bool m_descriptionHasBeenSet = false;
157
158 Aws::Vector<Tag> m_tags;
159 bool m_tagsHasBeenSet = false;
160 };
161
162} // namespace Model
163} // namespace IAM
164} // 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