AWS SDK for C++  1.9.107
AWS SDK for C++
Policy.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
12 #include <aws/iam/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Xml
20 {
21  class XmlNode;
22 } // namespace Xml
23 } // namespace Utils
24 namespace IAM
25 {
26 namespace Model
27 {
28 
41  {
42  public:
43  Policy();
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
50 
54  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
55 
59  inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
60 
64  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
65 
69  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
70 
74  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
75 
79  inline Policy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
80 
84  inline Policy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
85 
89  inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
90 
91 
98  inline const Aws::String& GetPolicyId() const{ return m_policyId; }
99 
106  inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
107 
114  inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; }
115 
122  inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); }
123 
130  inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); }
131 
138  inline Policy& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;}
139 
146  inline Policy& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;}
147 
154  inline Policy& WithPolicyId(const char* value) { SetPolicyId(value); return *this;}
155 
156 
157 
158  inline const Aws::String& GetArn() const{ return m_arn; }
159 
160 
161  inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
162 
163 
164  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
165 
166 
167  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
168 
169 
170  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
171 
172 
173  inline Policy& WithArn(const Aws::String& value) { SetArn(value); return *this;}
174 
175 
176  inline Policy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
177 
178 
179  inline Policy& WithArn(const char* value) { SetArn(value); return *this;}
180 
181 
187  inline const Aws::String& GetPath() const{ return m_path; }
188 
194  inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
195 
201  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
202 
208  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
209 
215  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
216 
222  inline Policy& WithPath(const Aws::String& value) { SetPath(value); return *this;}
223 
229  inline Policy& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
230 
236  inline Policy& WithPath(const char* value) { SetPath(value); return *this;}
237 
238 
243  inline const Aws::String& GetDefaultVersionId() const{ return m_defaultVersionId; }
244 
249  inline bool DefaultVersionIdHasBeenSet() const { return m_defaultVersionIdHasBeenSet; }
250 
255  inline void SetDefaultVersionId(const Aws::String& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = value; }
256 
261  inline void SetDefaultVersionId(Aws::String&& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = std::move(value); }
262 
267  inline void SetDefaultVersionId(const char* value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId.assign(value); }
268 
273  inline Policy& WithDefaultVersionId(const Aws::String& value) { SetDefaultVersionId(value); return *this;}
274 
279  inline Policy& WithDefaultVersionId(Aws::String&& value) { SetDefaultVersionId(std::move(value)); return *this;}
280 
285  inline Policy& WithDefaultVersionId(const char* value) { SetDefaultVersionId(value); return *this;}
286 
287 
292  inline int GetAttachmentCount() const{ return m_attachmentCount; }
293 
298  inline bool AttachmentCountHasBeenSet() const { return m_attachmentCountHasBeenSet; }
299 
304  inline void SetAttachmentCount(int value) { m_attachmentCountHasBeenSet = true; m_attachmentCount = value; }
305 
310  inline Policy& WithAttachmentCount(int value) { SetAttachmentCount(value); return *this;}
311 
312 
320  inline int GetPermissionsBoundaryUsageCount() const{ return m_permissionsBoundaryUsageCount; }
321 
329  inline bool PermissionsBoundaryUsageCountHasBeenSet() const { return m_permissionsBoundaryUsageCountHasBeenSet; }
330 
338  inline void SetPermissionsBoundaryUsageCount(int value) { m_permissionsBoundaryUsageCountHasBeenSet = true; m_permissionsBoundaryUsageCount = value; }
339 
347  inline Policy& WithPermissionsBoundaryUsageCount(int value) { SetPermissionsBoundaryUsageCount(value); return *this;}
348 
349 
354  inline bool GetIsAttachable() const{ return m_isAttachable; }
355 
360  inline bool IsAttachableHasBeenSet() const { return m_isAttachableHasBeenSet; }
361 
366  inline void SetIsAttachable(bool value) { m_isAttachableHasBeenSet = true; m_isAttachable = value; }
367 
372  inline Policy& WithIsAttachable(bool value) { SetIsAttachable(value); return *this;}
373 
374 
380  inline const Aws::String& GetDescription() const{ return m_description; }
381 
387  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
388 
394  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
395 
401  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
402 
408  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
409 
415  inline Policy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
416 
422  inline Policy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
423 
429  inline Policy& WithDescription(const char* value) { SetDescription(value); return *this;}
430 
431 
436  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
437 
442  inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
443 
448  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
449 
454  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); }
455 
460  inline Policy& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
461 
466  inline Policy& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;}
467 
468 
476  inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; }
477 
485  inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; }
486 
494  inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; }
495 
503  inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); }
504 
512  inline Policy& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;}
513 
521  inline Policy& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;}
522 
523 
530  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
531 
538  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
539 
546  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
547 
554  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
555 
562  inline Policy& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
563 
570  inline Policy& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
571 
578  inline Policy& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
579 
586  inline Policy& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
587 
588  private:
589 
590  Aws::String m_policyName;
591  bool m_policyNameHasBeenSet;
592 
593  Aws::String m_policyId;
594  bool m_policyIdHasBeenSet;
595 
596  Aws::String m_arn;
597  bool m_arnHasBeenSet;
598 
599  Aws::String m_path;
600  bool m_pathHasBeenSet;
601 
602  Aws::String m_defaultVersionId;
603  bool m_defaultVersionIdHasBeenSet;
604 
605  int m_attachmentCount;
606  bool m_attachmentCountHasBeenSet;
607 
608  int m_permissionsBoundaryUsageCount;
609  bool m_permissionsBoundaryUsageCountHasBeenSet;
610 
611  bool m_isAttachable;
612  bool m_isAttachableHasBeenSet;
613 
614  Aws::String m_description;
615  bool m_descriptionHasBeenSet;
616 
617  Aws::Utils::DateTime m_createDate;
618  bool m_createDateHasBeenSet;
619 
620  Aws::Utils::DateTime m_updateDate;
621  bool m_updateDateHasBeenSet;
622 
623  Aws::Vector<Tag> m_tags;
624  bool m_tagsHasBeenSet;
625  };
626 
627 } // namespace Model
628 } // namespace IAM
629 } // namespace Aws
Aws::Utils::DateTime
Definition: DateTime.h:55
Aws::IAM::Model::Policy::WithCreateDate
Policy & WithCreateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:466
Aws::IAM::Model::Policy::WithUpdateDate
Policy & WithUpdateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:512
Aws::IAM::Model::Policy::SetDefaultVersionId
void SetDefaultVersionId(Aws::String &&value)
Definition: Policy.h:261
Aws::IAM::Model::Policy::GetCreateDate
const Aws::Utils::DateTime & GetCreateDate() const
Definition: Policy.h:436
Aws::IAM::Model::Policy::SetPolicyId
void SetPolicyId(const Aws::String &value)
Definition: Policy.h:114
Tag.h
Aws::IAM::Model::Policy::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: Policy.h:554
Aws::IAM::Model::Policy::WithPolicyName
Policy & WithPolicyName(Aws::String &&value)
Definition: Policy.h:84
Aws::IAM::Model::Policy::WithArn
Policy & WithArn(const Aws::String &value)
Definition: Policy.h:173
Aws::IAM::Model::Policy::SetDescription
void SetDescription(Aws::String &&value)
Definition: Policy.h:401
Aws::IAM::Model::Policy::ArnHasBeenSet
bool ArnHasBeenSet() const
Definition: Policy.h:161
Aws::IAM::Model::Policy::WithCreateDate
Policy & WithCreateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:460
DateTime.h
Aws::IAM::Model::Policy::SetPolicyName
void SetPolicyName(const char *value)
Definition: Policy.h:74
Aws::IAM::Model::Policy::WithDefaultVersionId
Policy & WithDefaultVersionId(const char *value)
Definition: Policy.h:285
Aws::IAM::Model::Policy::SetArn
void SetArn(const char *value)
Definition: Policy.h:170
Aws::IAM::Model::Policy::SetArn
void SetArn(const Aws::String &value)
Definition: Policy.h:164
Aws::IAM::Model::Policy::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: Policy.h:530
Aws::EMR::Model::AuthMode::NOT_SET
@ NOT_SET
Aws::IAM::Model::Policy::WithPolicyId
Policy & WithPolicyId(Aws::String &&value)
Definition: Policy.h:146
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSStreamFwd.h
Aws::IAM::Model::Policy::WithPath
Policy & WithPath(Aws::String &&value)
Definition: Policy.h:229
Aws::IAM::Model::Policy::WithPermissionsBoundaryUsageCount
Policy & WithPermissionsBoundaryUsageCount(int value)
Definition: Policy.h:347
Aws::IAM::Model::Policy::Policy
Policy(const Aws::Utils::Xml::XmlNode &xmlNode)
AWSVector.h
Aws::IAM::Model::Policy::AddTags
Policy & AddTags(Tag &&value)
Definition: Policy.h:586
Aws::IAM::Model::Policy::SetIsAttachable
void SetIsAttachable(bool value)
Definition: Policy.h:366
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
AWS_IAM_API
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:28
Aws::IAM::Model::Policy::CreateDateHasBeenSet
bool CreateDateHasBeenSet() const
Definition: Policy.h:442
Aws::IAM::Model::Policy::AddTags
Policy & AddTags(const Tag &value)
Definition: Policy.h:578
Aws::IAM::Model::Policy::GetPath
const Aws::String & GetPath() const
Definition: Policy.h:187
Aws::IAM::Model::Policy::SetUpdateDate
void SetUpdateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:494
Aws::IAM::Model::Policy::SetPermissionsBoundaryUsageCount
void SetPermissionsBoundaryUsageCount(int value)
Definition: Policy.h:338
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::IAM::Model::Policy::SetPath
void SetPath(const char *value)
Definition: Policy.h:215
Aws::IAM::Model::Policy::SetUpdateDate
void SetUpdateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:503
Aws::IAM::Model::Policy::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::IAM::Model::Policy::GetAttachmentCount
int GetAttachmentCount() const
Definition: Policy.h:292
Aws::IAM::Model::Policy
Definition: Policy.h:41
Aws::IAM::Model::Policy::DefaultVersionIdHasBeenSet
bool DefaultVersionIdHasBeenSet() const
Definition: Policy.h:249
Aws::IAM::Model::Policy::WithArn
Policy & WithArn(const char *value)
Definition: Policy.h:179
Aws::IAM::Model::Policy::SetArn
void SetArn(Aws::String &&value)
Definition: Policy.h:167
Aws::IAM::Model::Policy::UpdateDateHasBeenSet
bool UpdateDateHasBeenSet() const
Definition: Policy.h:485
Aws::IAM::Model::Policy::WithAttachmentCount
Policy & WithAttachmentCount(int value)
Definition: Policy.h:310
Aws::IAM::Model::Policy::PolicyNameHasBeenSet
bool PolicyNameHasBeenSet() const
Definition: Policy.h:59
Aws::IAM::Model::Policy::SetCreateDate
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:448
Aws::IAM::Model::Policy::AttachmentCountHasBeenSet
bool AttachmentCountHasBeenSet() const
Definition: Policy.h:298
Aws::IAM::Model::Policy::GetUpdateDate
const Aws::Utils::DateTime & GetUpdateDate() const
Definition: Policy.h:476
Aws::IAM::Model::Policy::GetPermissionsBoundaryUsageCount
int GetPermissionsBoundaryUsageCount() const
Definition: Policy.h:320
Aws::IAM::Model::Policy::WithDescription
Policy & WithDescription(Aws::String &&value)
Definition: Policy.h:422
Aws::IAM::Model::Policy::GetArn
const Aws::String & GetArn() const
Definition: Policy.h:158
Aws::IAM::Model::Policy::WithPath
Policy & WithPath(const Aws::String &value)
Definition: Policy.h:222
Aws::IAM::Model::Policy::GetPolicyName
const Aws::String & GetPolicyName() const
Definition: Policy.h:54
Aws::IAM::Model::Policy::SetAttachmentCount
void SetAttachmentCount(int value)
Definition: Policy.h:304
Aws::IAM::Model::Policy::WithDescription
Policy & WithDescription(const Aws::String &value)
Definition: Policy.h:415
AWSString.h
Aws::IAM::Model::Policy::SetCreateDate
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:454
Aws::IAM::Model::Policy::WithArn
Policy & WithArn(Aws::String &&value)
Definition: Policy.h:176
Aws::IAM::Model::Policy::IsAttachableHasBeenSet
bool IsAttachableHasBeenSet() const
Definition: Policy.h:360
Aws::IAM::Model::Policy::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: Policy.h:546
Aws::IAM::Model::Policy::PermissionsBoundaryUsageCountHasBeenSet
bool PermissionsBoundaryUsageCountHasBeenSet() const
Definition: Policy.h:329
Aws::IAM::Model::Policy::WithDefaultVersionId
Policy & WithDefaultVersionId(const Aws::String &value)
Definition: Policy.h:273
Aws::IAM::Model::Policy::WithIsAttachable
Policy & WithIsAttachable(bool value)
Definition: Policy.h:372
Aws::IAM::Model::Policy::WithPolicyName
Policy & WithPolicyName(const Aws::String &value)
Definition: Policy.h:79
Aws::IAM::Model::Policy::SetPolicyName
void SetPolicyName(const Aws::String &value)
Definition: Policy.h:64
Aws::IAM::Model::Policy::SetDescription
void SetDescription(const char *value)
Definition: Policy.h:408
Aws::IAM::Model::Policy::Policy
Policy()
Aws::IAM::Model::Policy::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::IAM::Model::Policy::GetIsAttachable
bool GetIsAttachable() const
Definition: Policy.h:354
Aws::IAM::Model::Policy::GetDefaultVersionId
const Aws::String & GetDefaultVersionId() const
Definition: Policy.h:243
IAM_EXPORTS.h
Aws::IAM::Model::Policy::SetDefaultVersionId
void SetDefaultVersionId(const char *value)
Definition: Policy.h:267
Aws::IAM::Model::Policy::SetPolicyId
void SetPolicyId(const char *value)
Definition: Policy.h:130
Aws::IAM::Model::Policy::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: Policy.h:387
Aws::IAM::Model::Policy::WithPolicyName
Policy & WithPolicyName(const char *value)
Definition: Policy.h:89
Aws::IAM::Model::Policy::WithPolicyId
Policy & WithPolicyId(const char *value)
Definition: Policy.h:154
Aws::IAM::Model::Policy::SetDefaultVersionId
void SetDefaultVersionId(const Aws::String &value)
Definition: Policy.h:255
Aws::IAM::Model::Policy::WithTags
Policy & WithTags(const Aws::Vector< Tag > &value)
Definition: Policy.h:562
Aws
Definition: AccessManagementClient.h:15
Aws::IAM::Model::Policy::SetPolicyName
void SetPolicyName(Aws::String &&value)
Definition: Policy.h:69
Aws::IAM::Model::Policy::WithPath
Policy & WithPath(const char *value)
Definition: Policy.h:236
Aws::IAM::Model::Policy::WithDescription
Policy & WithDescription(const char *value)
Definition: Policy.h:429
Aws::IAM::Model::Policy::SetDescription
void SetDescription(const Aws::String &value)
Definition: Policy.h:394
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::Policy::GetDescription
const Aws::String & GetDescription() const
Definition: Policy.h:380
Aws::IAM::Model::Policy::SetPath
void SetPath(Aws::String &&value)
Definition: Policy.h:208
index
int index
Definition: cJSON.h:181
Aws::IAM::Model::Policy::SetPath
void SetPath(const Aws::String &value)
Definition: Policy.h:201
Aws::IAM::Model::Policy::WithTags
Policy & WithTags(Aws::Vector< Tag > &&value)
Definition: Policy.h:570
Aws::IAM::Model::Policy::GetPolicyId
const Aws::String & GetPolicyId() const
Definition: Policy.h:98
Aws::IAM::Model::Policy::WithDefaultVersionId
Policy & WithDefaultVersionId(Aws::String &&value)
Definition: Policy.h:279
Aws::IAM::Model::Policy::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: Policy.h:538
Aws::IAM::Model::Policy::PathHasBeenSet
bool PathHasBeenSet() const
Definition: Policy.h:194
Aws::IAM::Model::Policy::SetPolicyId
void SetPolicyId(Aws::String &&value)
Definition: Policy.h:122
Aws::IAM::Model::Policy::PolicyIdHasBeenSet
bool PolicyIdHasBeenSet() const
Definition: Policy.h:106
Aws::IAM::Model::Policy::operator=
Policy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::IAM::Model::Policy::WithPolicyId
Policy & WithPolicyId(const Aws::String &value)
Definition: Policy.h:138
Aws::IAM::Model::Policy::WithUpdateDate
Policy & WithUpdateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:521