password_policy#

State module for managing iam password policy.

async idem_aws.states.aws.iam.password_policy.present(hub, ctx, name: str, minimum_password_length: int = None, require_symbols: bool = False, require_numbers: bool = False, require_uppercase_characters: bool = False, require_lowercase_characters: bool = False, allow_users_to_change_password: bool = False, max_password_age: int = None, password_reuse_prevention: int = None, hard_expiry: bool = False) Dict[str, Any][source]#

Create/Update the password policy settings for the Amazon Web Services account.

Parameters:
  • name (str) – An Idem name of the resource.

  • minimum_password_length (int, Optional) – 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.

  • require_symbols (bool, Optional) – 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.

  • require_numbers (bool, Optional) – 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.

  • require_uppercase_characters (bool, Optional) – 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.

  • require_lowercase_characters (bool, Optional) – 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.

  • allow_users_to_change_password (bool, Optional) – 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.

  • max_password_age (int, Optional) – 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.

  • password_reuse_prevention (int, Optional) – 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.

  • hard_expiry (bool, Optional) – 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.

Request Syntax:
[password-policy]:
  aws.iam.password_policy.present:
  - minimum_password_length: 'string'
  - require_symbols: 'string'
  - require_numbers: 'string'
  - require_uppercase_characters: 'string'
  - require_lowercase_characters: 'string'
  - allow_users_to_change_password: 'string'
  - max_password_age: 'string'
  - password_reuse_prevention: 'string'
  - hard_expiry: 'string'
Returns:

Dict[str, str]

Examples

password-policy-011922870716:
  aws.iam.password_policy.present:
  - minimum_password_length: 6
  - require_symbols: true
  - require_numbers: true
  - require_uppercase_characters: true
  - require_lowercase_characters: true
  - allow_users_to_change_password: true
  - max_password_age: 90
  - password_reuse_prevention: 3
  - hard_expiry: true
async idem_aws.states.aws.iam.password_policy.absent(hub, ctx, name: str) Dict[str, Any][source]#

Deletes the password policy for the Amazon Web Services account.

Parameters:

name (str) – Password policy name.

Request Syntax:
password-policy:
  aws.iam.password_policy.absent:
  - name: 'string'
Returns:

Dict[str, Any]

Examples

resource_is_absent:
  aws.iam.password_policy.absent:
  - name: value
async idem_aws.states.aws.iam.password_policy.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Gets information about the iam password policy.

Retrieves the password policy for the Amazon Web Services account. This tells you the complexity requirements and mandatory rotation periods for the IAM user passwords in your account.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.iam.password_policy