/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include namespace Aws { namespace IAM { namespace Model { /** */ class UpdateAccountPasswordPolicyRequest : public IAMRequest { public: AWS_IAM_API UpdateAccountPasswordPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateAccountPasswordPolicy"; } AWS_IAM_API Aws::String SerializePayload() const override; protected: AWS_IAM_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The minimum number of characters allowed in an IAM user password.

If * you do not specify a value for this parameter, then the operation uses the * default value of 6.

*/ inline int GetMinimumPasswordLength() const{ return m_minimumPasswordLength; } /** *

The minimum number of characters allowed in an IAM user password.

If * you do not specify a value for this parameter, then the operation uses the * default value of 6.

*/ inline bool MinimumPasswordLengthHasBeenSet() const { return m_minimumPasswordLengthHasBeenSet; } /** *

The minimum number of characters allowed in an IAM user password.

If * you do not specify a value for this parameter, then the operation uses the * default value of 6.

*/ inline void SetMinimumPasswordLength(int value) { m_minimumPasswordLengthHasBeenSet = true; m_minimumPasswordLength = value; } /** *

The minimum number of characters allowed in an IAM user password.

If * you do not specify a value for this parameter, then the operation uses the * default value of 6.

*/ inline UpdateAccountPasswordPolicyRequest& WithMinimumPasswordLength(int value) { SetMinimumPasswordLength(value); return *this;} /** *

Specifies whether IAM user passwords must contain at least one of the * following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ * ] { } | '

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that * passwords do not require at least one symbol character.

*/ inline bool GetRequireSymbols() const{ return m_requireSymbols; } /** *

Specifies whether IAM user passwords must contain at least one of the * following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ * ] { } | '

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that * passwords do not require at least one symbol character.

*/ inline bool RequireSymbolsHasBeenSet() const { return m_requireSymbolsHasBeenSet; } /** *

Specifies whether IAM user passwords must contain at least one of the * following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ * ] { } | '

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that * passwords do not require at least one symbol character.

*/ inline void SetRequireSymbols(bool value) { m_requireSymbolsHasBeenSet = true; m_requireSymbols = value; } /** *

Specifies whether IAM user passwords must contain at least one of the * following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ * ] { } | '

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that * passwords do not require at least one symbol character.

*/ inline UpdateAccountPasswordPolicyRequest& WithRequireSymbols(bool value) { SetRequireSymbols(value); return *this;} /** *

Specifies whether IAM user passwords must contain at least one numeric * character (0 to 9).

If you do not specify a value for this parameter, * then the operation uses the default value of false. The result is * that passwords do not require at least one numeric character.

*/ inline bool GetRequireNumbers() const{ return m_requireNumbers; } /** *

Specifies whether IAM user passwords must contain at least one numeric * character (0 to 9).

If you do not specify a value for this parameter, * then the operation uses the default value of false. The result is * that passwords do not require at least one numeric character.

*/ inline bool RequireNumbersHasBeenSet() const { return m_requireNumbersHasBeenSet; } /** *

Specifies whether IAM user passwords must contain at least one numeric * character (0 to 9).

If you do not specify a value for this parameter, * then the operation uses the default value of false. The result is * that passwords do not require at least one numeric character.

*/ inline void SetRequireNumbers(bool value) { m_requireNumbersHasBeenSet = true; m_requireNumbers = value; } /** *

Specifies whether IAM user passwords must contain at least one numeric * character (0 to 9).

If you do not specify a value for this parameter, * then the operation uses the default value of false. The result is * that passwords do not require at least one numeric character.

*/ inline UpdateAccountPasswordPolicyRequest& WithRequireNumbers(bool value) { SetRequireNumbers(value); return *this;} /** *

Specifies whether IAM user passwords must contain at least one uppercase * character from the ISO basic Latin alphabet (A to Z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * uppercase character.

*/ inline bool GetRequireUppercaseCharacters() const{ return m_requireUppercaseCharacters; } /** *

Specifies whether IAM user passwords must contain at least one uppercase * character from the ISO basic Latin alphabet (A to Z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * uppercase character.

*/ inline bool RequireUppercaseCharactersHasBeenSet() const { return m_requireUppercaseCharactersHasBeenSet; } /** *

Specifies whether IAM user passwords must contain at least one uppercase * character from the ISO basic Latin alphabet (A to Z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * uppercase character.

*/ inline void SetRequireUppercaseCharacters(bool value) { m_requireUppercaseCharactersHasBeenSet = true; m_requireUppercaseCharacters = value; } /** *

Specifies whether IAM user passwords must contain at least one uppercase * character from the ISO basic Latin alphabet (A to Z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * uppercase character.

*/ inline UpdateAccountPasswordPolicyRequest& WithRequireUppercaseCharacters(bool value) { SetRequireUppercaseCharacters(value); return *this;} /** *

Specifies whether IAM user passwords must contain at least one lowercase * character from the ISO basic Latin alphabet (a to z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * lowercase character.

*/ inline bool GetRequireLowercaseCharacters() const{ return m_requireLowercaseCharacters; } /** *

Specifies whether IAM user passwords must contain at least one lowercase * character from the ISO basic Latin alphabet (a to z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * lowercase character.

*/ inline bool RequireLowercaseCharactersHasBeenSet() const { return m_requireLowercaseCharactersHasBeenSet; } /** *

Specifies whether IAM user passwords must contain at least one lowercase * character from the ISO basic Latin alphabet (a to z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * lowercase character.

*/ inline void SetRequireLowercaseCharacters(bool value) { m_requireLowercaseCharactersHasBeenSet = true; m_requireLowercaseCharacters = value; } /** *

Specifies whether IAM user passwords must contain at least one lowercase * character from the ISO basic Latin alphabet (a to z).

If you do not * specify a value for this parameter, then the operation uses the default value of * false. The result is that passwords do not require at least one * lowercase character.

*/ inline UpdateAccountPasswordPolicyRequest& WithRequireLowercaseCharacters(bool value) { SetRequireLowercaseCharacters(value); return *this;} /** *

Allows all IAM users in your account to use the Amazon Web Services * Management Console to change their own passwords. For more information, see Permitting * IAM users to change their own passwords in the IAM User Guide.

*

If you do not specify a value for this parameter, then the operation uses the * default value of false. The result is that IAM users in the account * do not automatically have permissions to change their own password.

*/ inline bool GetAllowUsersToChangePassword() const{ return m_allowUsersToChangePassword; } /** *

Allows all IAM users in your account to use the Amazon Web Services * Management Console to change their own passwords. For more information, see Permitting * IAM users to change their own passwords in the IAM User Guide.

*

If you do not specify a value for this parameter, then the operation uses the * default value of false. The result is that IAM users in the account * do not automatically have permissions to change their own password.

*/ inline bool AllowUsersToChangePasswordHasBeenSet() const { return m_allowUsersToChangePasswordHasBeenSet; } /** *

Allows all IAM users in your account to use the Amazon Web Services * Management Console to change their own passwords. For more information, see Permitting * IAM users to change their own passwords in the IAM User Guide.

*

If you do not specify a value for this parameter, then the operation uses the * default value of false. The result is that IAM users in the account * do not automatically have permissions to change their own password.

*/ inline void SetAllowUsersToChangePassword(bool value) { m_allowUsersToChangePasswordHasBeenSet = true; m_allowUsersToChangePassword = value; } /** *

Allows all IAM users in your account to use the Amazon Web Services * Management Console to change their own passwords. For more information, see Permitting * IAM users to change their own passwords in the IAM User Guide.

*

If you do not specify a value for this parameter, then the operation uses the * default value of false. The result is that IAM users in the account * do not automatically have permissions to change their own password.

*/ inline UpdateAccountPasswordPolicyRequest& WithAllowUsersToChangePassword(bool value) { SetAllowUsersToChangePassword(value); return *this;} /** *

The number of days that an IAM user password is valid.

If you do not * specify a value for this parameter, then the operation uses the default value of * 0. The result is that IAM user passwords never expire.

*/ inline int GetMaxPasswordAge() const{ return m_maxPasswordAge; } /** *

The number of days that an IAM user password is valid.

If you do not * specify a value for this parameter, then the operation uses the default value of * 0. The result is that IAM user passwords never expire.

*/ inline bool MaxPasswordAgeHasBeenSet() const { return m_maxPasswordAgeHasBeenSet; } /** *

The number of days that an IAM user password is valid.

If you do not * specify a value for this parameter, then the operation uses the default value of * 0. The result is that IAM user passwords never expire.

*/ inline void SetMaxPasswordAge(int value) { m_maxPasswordAgeHasBeenSet = true; m_maxPasswordAge = value; } /** *

The number of days that an IAM user password is valid.

If you do not * specify a value for this parameter, then the operation uses the default value of * 0. The result is that IAM user passwords never expire.

*/ inline UpdateAccountPasswordPolicyRequest& WithMaxPasswordAge(int value) { SetMaxPasswordAge(value); return *this;} /** *

Specifies the number of previous passwords that IAM users are prevented from * reusing.

If you do not specify a value for this parameter, then the * operation uses the default value of 0. The result is that IAM users * are not prevented from reusing previous passwords.

*/ inline int GetPasswordReusePrevention() const{ return m_passwordReusePrevention; } /** *

Specifies the number of previous passwords that IAM users are prevented from * reusing.

If you do not specify a value for this parameter, then the * operation uses the default value of 0. The result is that IAM users * are not prevented from reusing previous passwords.

*/ inline bool PasswordReusePreventionHasBeenSet() const { return m_passwordReusePreventionHasBeenSet; } /** *

Specifies the number of previous passwords that IAM users are prevented from * reusing.

If you do not specify a value for this parameter, then the * operation uses the default value of 0. The result is that IAM users * are not prevented from reusing previous passwords.

*/ inline void SetPasswordReusePrevention(int value) { m_passwordReusePreventionHasBeenSet = true; m_passwordReusePrevention = value; } /** *

Specifies the number of previous passwords that IAM users are prevented from * reusing.

If you do not specify a value for this parameter, then the * operation uses the default value of 0. The result is that IAM users * are not prevented from reusing previous passwords.

*/ inline UpdateAccountPasswordPolicyRequest& WithPasswordReusePrevention(int value) { SetPasswordReusePrevention(value); return *this;} /** *

Prevents IAM users who are accessing the account via the Amazon Web Services * Management Console from setting a new console password after their password has * expired. The IAM user cannot access the console until an administrator resets * the password.

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that IAM * users can change their passwords after they expire and continue to sign in as * the user.

In the Amazon Web Services Management Console, the * custom password policy option Allow users to change their own password * gives IAM users permissions to iam:ChangePassword for only their * user and to the iam:GetAccountPasswordPolicy action. This option * does not attach a permissions policy to each user, rather the permissions are * applied at the account-level for all users by IAM. IAM users with * iam:ChangePassword permission and active access keys can reset * their own expired console password using the CLI or API.

*/ inline bool GetHardExpiry() const{ return m_hardExpiry; } /** *

Prevents IAM users who are accessing the account via the Amazon Web Services * Management Console from setting a new console password after their password has * expired. The IAM user cannot access the console until an administrator resets * the password.

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that IAM * users can change their passwords after they expire and continue to sign in as * the user.

In the Amazon Web Services Management Console, the * custom password policy option Allow users to change their own password * gives IAM users permissions to iam:ChangePassword for only their * user and to the iam:GetAccountPasswordPolicy action. This option * does not attach a permissions policy to each user, rather the permissions are * applied at the account-level for all users by IAM. IAM users with * iam:ChangePassword permission and active access keys can reset * their own expired console password using the CLI or API.

*/ inline bool HardExpiryHasBeenSet() const { return m_hardExpiryHasBeenSet; } /** *

Prevents IAM users who are accessing the account via the Amazon Web Services * Management Console from setting a new console password after their password has * expired. The IAM user cannot access the console until an administrator resets * the password.

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that IAM * users can change their passwords after they expire and continue to sign in as * the user.

In the Amazon Web Services Management Console, the * custom password policy option Allow users to change their own password * gives IAM users permissions to iam:ChangePassword for only their * user and to the iam:GetAccountPasswordPolicy action. This option * does not attach a permissions policy to each user, rather the permissions are * applied at the account-level for all users by IAM. IAM users with * iam:ChangePassword permission and active access keys can reset * their own expired console password using the CLI or API.

*/ inline void SetHardExpiry(bool value) { m_hardExpiryHasBeenSet = true; m_hardExpiry = value; } /** *

Prevents IAM users who are accessing the account via the Amazon Web Services * Management Console from setting a new console password after their password has * expired. The IAM user cannot access the console until an administrator resets * the password.

If you do not specify a value for this parameter, then the * operation uses the default value of false. The result is that IAM * users can change their passwords after they expire and continue to sign in as * the user.

In the Amazon Web Services Management Console, the * custom password policy option Allow users to change their own password * gives IAM users permissions to iam:ChangePassword for only their * user and to the iam:GetAccountPasswordPolicy action. This option * does not attach a permissions policy to each user, rather the permissions are * applied at the account-level for all users by IAM. IAM users with * iam:ChangePassword permission and active access keys can reset * their own expired console password using the CLI or API.

*/ inline UpdateAccountPasswordPolicyRequest& WithHardExpiry(bool value) { SetHardExpiry(value); return *this;} private: int m_minimumPasswordLength; bool m_minimumPasswordLengthHasBeenSet = false; bool m_requireSymbols; bool m_requireSymbolsHasBeenSet = false; bool m_requireNumbers; bool m_requireNumbersHasBeenSet = false; bool m_requireUppercaseCharacters; bool m_requireUppercaseCharactersHasBeenSet = false; bool m_requireLowercaseCharacters; bool m_requireLowercaseCharactersHasBeenSet = false; bool m_allowUsersToChangePassword; bool m_allowUsersToChangePasswordHasBeenSet = false; int m_maxPasswordAge; bool m_maxPasswordAgeHasBeenSet = false; int m_passwordReusePrevention; bool m_passwordReusePreventionHasBeenSet = false; bool m_hardExpiry; bool m_hardExpiryHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws