AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
PasswordPolicy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/iam/IAM_EXPORTS.h>
9
10namespace Aws {
11namespace Utils {
12namespace Xml {
13class XmlNode;
14} // namespace Xml
15} // namespace Utils
16namespace IAM {
17namespace Model {
18
28 public:
29 AWS_IAM_API PasswordPolicy() = default;
30 AWS_IAM_API PasswordPolicy(const Aws::Utils::Xml::XmlNode& xmlNode);
32
33 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
34 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
35
37
40 inline int GetMinimumPasswordLength() const { return m_minimumPasswordLength; }
41 inline bool MinimumPasswordLengthHasBeenSet() const { return m_minimumPasswordLengthHasBeenSet; }
42 inline void SetMinimumPasswordLength(int value) {
43 m_minimumPasswordLengthHasBeenSet = true;
44 m_minimumPasswordLength = value;
45 }
48 return *this;
49 }
51
53
57 inline bool GetRequireSymbols() const { return m_requireSymbols; }
58 inline bool RequireSymbolsHasBeenSet() const { return m_requireSymbolsHasBeenSet; }
59 inline void SetRequireSymbols(bool value) {
60 m_requireSymbolsHasBeenSet = true;
61 m_requireSymbols = value;
62 }
63 inline PasswordPolicy& WithRequireSymbols(bool value) {
64 SetRequireSymbols(value);
65 return *this;
66 }
68
70
74 inline bool GetRequireNumbers() const { return m_requireNumbers; }
75 inline bool RequireNumbersHasBeenSet() const { return m_requireNumbersHasBeenSet; }
76 inline void SetRequireNumbers(bool value) {
77 m_requireNumbersHasBeenSet = true;
78 m_requireNumbers = value;
79 }
80 inline PasswordPolicy& WithRequireNumbers(bool value) {
81 SetRequireNumbers(value);
82 return *this;
83 }
85
87
91 inline bool GetRequireUppercaseCharacters() const { return m_requireUppercaseCharacters; }
92 inline bool RequireUppercaseCharactersHasBeenSet() const { return m_requireUppercaseCharactersHasBeenSet; }
93 inline void SetRequireUppercaseCharacters(bool value) {
94 m_requireUppercaseCharactersHasBeenSet = true;
95 m_requireUppercaseCharacters = value;
96 }
99 return *this;
100 }
102
104
108 inline bool GetRequireLowercaseCharacters() const { return m_requireLowercaseCharacters; }
109 inline bool RequireLowercaseCharactersHasBeenSet() const { return m_requireLowercaseCharactersHasBeenSet; }
110 inline void SetRequireLowercaseCharacters(bool value) {
111 m_requireLowercaseCharactersHasBeenSet = true;
112 m_requireLowercaseCharacters = value;
113 }
116 return *this;
117 }
119
121
128 inline bool GetAllowUsersToChangePassword() const { return m_allowUsersToChangePassword; }
129 inline bool AllowUsersToChangePasswordHasBeenSet() const { return m_allowUsersToChangePasswordHasBeenSet; }
130 inline void SetAllowUsersToChangePassword(bool value) {
131 m_allowUsersToChangePasswordHasBeenSet = true;
132 m_allowUsersToChangePassword = value;
133 }
136 return *this;
137 }
139
141
146 inline bool GetExpirePasswords() const { return m_expirePasswords; }
147 inline bool ExpirePasswordsHasBeenSet() const { return m_expirePasswordsHasBeenSet; }
148 inline void SetExpirePasswords(bool value) {
149 m_expirePasswordsHasBeenSet = true;
150 m_expirePasswords = value;
151 }
153 SetExpirePasswords(value);
154 return *this;
155 }
157
159
162 inline int GetMaxPasswordAge() const { return m_maxPasswordAge; }
163 inline bool MaxPasswordAgeHasBeenSet() const { return m_maxPasswordAgeHasBeenSet; }
164 inline void SetMaxPasswordAge(int value) {
165 m_maxPasswordAgeHasBeenSet = true;
166 m_maxPasswordAge = value;
167 }
169 SetMaxPasswordAge(value);
170 return *this;
171 }
173
175
179 inline int GetPasswordReusePrevention() const { return m_passwordReusePrevention; }
180 inline bool PasswordReusePreventionHasBeenSet() const { return m_passwordReusePreventionHasBeenSet; }
181 inline void SetPasswordReusePrevention(int value) {
182 m_passwordReusePreventionHasBeenSet = true;
183 m_passwordReusePrevention = value;
184 }
187 return *this;
188 }
190
192
199 inline bool GetHardExpiry() const { return m_hardExpiry; }
200 inline bool HardExpiryHasBeenSet() const { return m_hardExpiryHasBeenSet; }
201 inline void SetHardExpiry(bool value) {
202 m_hardExpiryHasBeenSet = true;
203 m_hardExpiry = value;
204 }
205 inline PasswordPolicy& WithHardExpiry(bool value) {
206 SetHardExpiry(value);
207 return *this;
208 }
210 private:
211 int m_minimumPasswordLength{0};
212
213 bool m_requireSymbols{false};
214
215 bool m_requireNumbers{false};
216
217 bool m_requireUppercaseCharacters{false};
218
219 bool m_requireLowercaseCharacters{false};
220
221 bool m_allowUsersToChangePassword{false};
222
223 bool m_expirePasswords{false};
224
225 int m_maxPasswordAge{0};
226
227 int m_passwordReusePrevention{0};
228
229 bool m_hardExpiry{false};
230 bool m_minimumPasswordLengthHasBeenSet = false;
231 bool m_requireSymbolsHasBeenSet = false;
232 bool m_requireNumbersHasBeenSet = false;
233 bool m_requireUppercaseCharactersHasBeenSet = false;
234 bool m_requireLowercaseCharactersHasBeenSet = false;
235 bool m_allowUsersToChangePasswordHasBeenSet = false;
236 bool m_expirePasswordsHasBeenSet = false;
237 bool m_maxPasswordAgeHasBeenSet = false;
238 bool m_passwordReusePreventionHasBeenSet = false;
239 bool m_hardExpiryHasBeenSet = false;
240};
241
242} // namespace Model
243} // namespace IAM
244} // namespace Aws
void SetRequireLowercaseCharacters(bool value)
bool RequireLowercaseCharactersHasBeenSet() const
void SetAllowUsersToChangePassword(bool value)
void SetRequireUppercaseCharacters(bool value)
bool RequireUppercaseCharactersHasBeenSet() const
PasswordPolicy & WithHardExpiry(bool value)
AWS_IAM_API PasswordPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool AllowUsersToChangePasswordHasBeenSet() const
PasswordPolicy & WithRequireLowercaseCharacters(bool value)
PasswordPolicy & WithAllowUsersToChangePassword(bool value)
void SetMinimumPasswordLength(int value)
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
PasswordPolicy & WithRequireNumbers(bool value)
PasswordPolicy & WithRequireUppercaseCharacters(bool value)
PasswordPolicy & WithPasswordReusePrevention(int value)
PasswordPolicy & WithMinimumPasswordLength(int value)
PasswordPolicy & WithMaxPasswordAge(int value)
void SetPasswordReusePrevention(int value)
PasswordPolicy & WithRequireSymbols(bool value)
AWS_IAM_API PasswordPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_IAM_API PasswordPolicy()=default
PasswordPolicy & WithExpirePasswords(bool value)
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
std::basic_ostream< char, std::char_traits< char > > OStream