AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
51 inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
52 inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
53 inline CreatePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
54 inline CreatePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
55 inline CreatePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
57
59
72 inline const Aws::String& GetPath() const{ return m_path; }
73 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
74 inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
75 inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
76 inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
77 inline CreatePolicyRequest& WithPath(const Aws::String& value) { SetPath(value); return *this;}
78 inline CreatePolicyRequest& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
79 inline CreatePolicyRequest& WithPath(const char* value) { SetPath(value); return *this;}
81
83
106 inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; }
107 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
108 inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; }
109 inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); }
110 inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); }
111 inline CreatePolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;}
112 inline CreatePolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;}
113 inline CreatePolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;}
115
117
123 inline const Aws::String& GetDescription() const{ return m_description; }
124 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
125 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
126 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
127 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
128 inline CreatePolicyRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
129 inline CreatePolicyRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
130 inline CreatePolicyRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
132
134
143 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
144 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
145 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
146 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
147 inline CreatePolicyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
148 inline CreatePolicyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
149 inline CreatePolicyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
150 inline CreatePolicyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
152 private:
153
154 Aws::String m_policyName;
155 bool m_policyNameHasBeenSet = false;
156
157 Aws::String m_path;
158 bool m_pathHasBeenSet = false;
159
160 Aws::String m_policyDocument;
161 bool m_policyDocumentHasBeenSet = false;
162
163 Aws::String m_description;
164 bool m_descriptionHasBeenSet = false;
165
166 Aws::Vector<Tag> m_tags;
167 bool m_tagsHasBeenSet = false;
168 };
169
170} // namespace Model
171} // namespace IAM
172} // namespace Aws
CreatePolicyRequest & WithPolicyName(Aws::String &&value)
void SetPolicyName(Aws::String &&value)
CreatePolicyRequest & WithPolicyDocument(const char *value)
CreatePolicyRequest & WithPolicyName(const Aws::String &value)
void SetPolicyDocument(Aws::String &&value)
void SetTags(Aws::Vector< Tag > &&value)
virtual const char * GetServiceRequestName() const override
CreatePolicyRequest & WithDescription(const Aws::String &value)
void SetPolicyDocument(const Aws::String &value)
CreatePolicyRequest & WithPath(const Aws::String &value)
void SetPath(const Aws::String &value)
const Aws::String & GetPolicyName() const
CreatePolicyRequest & WithPath(const char *value)
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetPolicyDocument() const
CreatePolicyRequest & WithDescription(Aws::String &&value)
CreatePolicyRequest & WithTags(Aws::Vector< Tag > &&value)
CreatePolicyRequest & WithTags(const Aws::Vector< Tag > &value)
const Aws::String & GetPath() const
void SetPolicyName(const Aws::String &value)
const Aws::String & GetDescription() const
CreatePolicyRequest & WithPolicyName(const char *value)
CreatePolicyRequest & AddTags(const Tag &value)
AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWS_IAM_API Aws::String SerializePayload() const override
CreatePolicyRequest & WithPolicyDocument(Aws::String &&value)
void SetTags(const Aws::Vector< Tag > &value)
CreatePolicyRequest & WithPolicyDocument(const Aws::String &value)
void SetDescription(const Aws::String &value)
CreatePolicyRequest & AddTags(Tag &&value)
CreatePolicyRequest & WithPath(Aws::String &&value)
CreatePolicyRequest & WithDescription(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector