AWS SDK for C++  1.9.40
AWS SDK for C++
CreatePolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
8 #include <aws/iam/IAMRequest.h>
11 #include <aws/iam/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace IAM
17 {
18 namespace Model
19 {
20 
24  {
25  public:
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::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
47  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
48 
55  inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
56 
63  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
64 
71  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
72 
79  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
80 
87  inline CreatePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
88 
95  inline CreatePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
96 
103  inline CreatePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
104 
105 
118  inline const Aws::String& GetPath() const{ return m_path; }
119 
132  inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
133 
146  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
147 
160  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
161 
174  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
175 
188  inline CreatePolicyRequest& WithPath(const Aws::String& value) { SetPath(value); return *this;}
189 
202  inline CreatePolicyRequest& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
203 
216  inline CreatePolicyRequest& WithPath(const char* value) { SetPath(value); return *this;}
217 
218 
237  inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; }
238 
257  inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
258 
277  inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; }
278 
297  inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); }
298 
317  inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); }
318 
337  inline CreatePolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;}
338 
357  inline CreatePolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;}
358 
377  inline CreatePolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;}
378 
379 
386  inline const Aws::String& GetDescription() const{ return m_description; }
387 
394  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
395 
402  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
403 
410  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
411 
418  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
419 
426  inline CreatePolicyRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
427 
434  inline CreatePolicyRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
435 
442  inline CreatePolicyRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
443 
444 
454  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
455 
465  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
466 
476  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
477 
487  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
488 
498  inline CreatePolicyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
499 
509  inline CreatePolicyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
510 
520  inline CreatePolicyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
521 
531  inline CreatePolicyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
532 
533  private:
534 
535  Aws::String m_policyName;
536  bool m_policyNameHasBeenSet;
537 
538  Aws::String m_path;
539  bool m_pathHasBeenSet;
540 
541  Aws::String m_policyDocument;
542  bool m_policyDocumentHasBeenSet;
543 
544  Aws::String m_description;
545  bool m_descriptionHasBeenSet;
546 
547  Aws::Vector<Tag> m_tags;
548  bool m_tagsHasBeenSet;
549  };
550 
551 } // namespace Model
552 } // namespace IAM
553 } // namespace Aws
Aws::IAM::Model::CreatePolicyRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreatePolicyRequest.h:465
Aws::Http::URI
Definition: URI.h:32
Tag.h
Aws::IAM::Model::CreatePolicyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::IAM::Model::CreatePolicyRequest::WithDescription
CreatePolicyRequest & WithDescription(const char *value)
Definition: CreatePolicyRequest.h:442
Aws::IAM::Model::CreatePolicyRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::IAM::Model::CreatePolicyRequest::GetPolicyDocument
const Aws::String & GetPolicyDocument() const
Definition: CreatePolicyRequest.h:237
Aws::IAM::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(const Aws::String &value)
Definition: CreatePolicyRequest.h:277
Aws::IAM::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(const char *value)
Definition: CreatePolicyRequest.h:79
Aws::IAM::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(const char *value)
Definition: CreatePolicyRequest.h:377
Aws::IAM::IAMRequest
Definition: IAMRequest.h:17
Aws::EMR::Model::AuthMode::NOT_SET
@ NOT_SET
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::IAM::Model::CreatePolicyRequest::WithPath
CreatePolicyRequest & WithPath(const Aws::String &value)
Definition: CreatePolicyRequest.h:188
Aws::IAM::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(const char *value)
Definition: CreatePolicyRequest.h:317
AWSVector.h
Aws::IAM::Model::CreatePolicyRequest::SetDescription
void SetDescription(const char *value)
Definition: CreatePolicyRequest.h:418
Aws::IAM::Model::CreatePolicyRequest::AddTags
CreatePolicyRequest & AddTags(Tag &&value)
Definition: CreatePolicyRequest.h:531
Aws::IAM::Model::CreatePolicyRequest::WithTags
CreatePolicyRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreatePolicyRequest.h:498
Aws::IAM::Model::CreatePolicyRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreatePolicyRequest.h:487
Aws::IAM::Model::CreatePolicyRequest
Definition: CreatePolicyRequest.h:24
Aws::IAM::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(const Aws::String &value)
Definition: CreatePolicyRequest.h:63
AWS_IAM_API
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:28
Aws::IAM::Model::CreatePolicyRequest::WithPath
CreatePolicyRequest & WithPath(const char *value)
Definition: CreatePolicyRequest.h:216
Aws::IAM::Model::CreatePolicyRequest::AddTags
CreatePolicyRequest & AddTags(const Tag &value)
Definition: CreatePolicyRequest.h:520
Aws::IAM::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(Aws::String &&value)
Definition: CreatePolicyRequest.h:95
Aws::IAM::Model::CreatePolicyRequest::SetPath
void SetPath(Aws::String &&value)
Definition: CreatePolicyRequest.h:160
Aws::IAM::Model::CreatePolicyRequest::WithTags
CreatePolicyRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreatePolicyRequest.h:509
Aws::IAM::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(Aws::String &&value)
Definition: CreatePolicyRequest.h:357
AWSString.h
Aws::IAM::Model::CreatePolicyRequest::PathHasBeenSet
bool PathHasBeenSet() const
Definition: CreatePolicyRequest.h:132
Aws::IAM::Model::CreatePolicyRequest::SetPath
void SetPath(const char *value)
Definition: CreatePolicyRequest.h:174
Aws::IAM::Model::CreatePolicyRequest::WithPath
CreatePolicyRequest & WithPath(Aws::String &&value)
Definition: CreatePolicyRequest.h:202
Aws::IAM::Model::CreatePolicyRequest::GetPath
const Aws::String & GetPath() const
Definition: CreatePolicyRequest.h:118
Aws::IAM::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(const Aws::String &value)
Definition: CreatePolicyRequest.h:87
Aws::IAM::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(Aws::String &&value)
Definition: CreatePolicyRequest.h:71
Aws::IAM::Model::CreatePolicyRequest::CreatePolicyRequest
CreatePolicyRequest()
Aws::IAM::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(Aws::String &&value)
Definition: CreatePolicyRequest.h:297
Aws::IAM::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(const Aws::String &value)
Definition: CreatePolicyRequest.h:337
IAM_EXPORTS.h
Aws::IAM::Model::CreatePolicyRequest::SetPath
void SetPath(const Aws::String &value)
Definition: CreatePolicyRequest.h:146
IAMRequest.h
Aws
Definition: AccessManagementClient.h:15
Aws::IAM::Model::CreatePolicyRequest::SetDescription
void SetDescription(Aws::String &&value)
Definition: CreatePolicyRequest.h:410
Aws::IAM::Model::CreatePolicyRequest::WithDescription
CreatePolicyRequest & WithDescription(const Aws::String &value)
Definition: CreatePolicyRequest.h:426
Aws::IAM::Model::CreatePolicyRequest::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: CreatePolicyRequest.h:394
Aws::IAM::Model::CreatePolicyRequest::GetDescription
const Aws::String & GetDescription() const
Definition: CreatePolicyRequest.h:386
Aws::IAM::Model::Tag
Definition: Tag.h:35
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::IAM::Model::CreatePolicyRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreatePolicyRequest.h:454
Aws::IAM::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(const char *value)
Definition: CreatePolicyRequest.h:103
Aws::IAM::Model::CreatePolicyRequest::WithDescription
CreatePolicyRequest & WithDescription(Aws::String &&value)
Definition: CreatePolicyRequest.h:434
Aws::IAM::Model::CreatePolicyRequest::PolicyNameHasBeenSet
bool PolicyNameHasBeenSet() const
Definition: CreatePolicyRequest.h:55
Aws::IAM::Model::CreatePolicyRequest::SetDescription
void SetDescription(const Aws::String &value)
Definition: CreatePolicyRequest.h:402
Aws::IAM::Model::CreatePolicyRequest::GetPolicyName
const Aws::String & GetPolicyName() const
Definition: CreatePolicyRequest.h:47
Aws::IAM::Model::CreatePolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreatePolicyRequest.h:32
Aws::IAM::Model::CreatePolicyRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreatePolicyRequest.h:476
Aws::IAM::Model::CreatePolicyRequest::PolicyDocumentHasBeenSet
bool PolicyDocumentHasBeenSet() const
Definition: CreatePolicyRequest.h:257