You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::IAM::AccountPasswordPolicy

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#allow_users_to_change_passwordBoolean (readonly)

Specifies whether IAM users are allowed to change their own password.

Returns:

  • (Boolean)

    Specifies whether IAM users are allowed to change their own password.

#expire_passwordsBoolean (readonly)

Indicates whether passwords in the account expire. Returns true if MaxPasswordAge contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.

Returns:

  • (Boolean)

    Indicates whether passwords in the account expire.

#hard_expiryBoolean (readonly)

Specifies whether IAM users are prevented from setting a new password after their password has expired.

Returns:

  • (Boolean)

    Specifies whether IAM users are prevented from setting a new password after their password has expired.

#max_password_ageInteger (readonly)

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

Returns:

  • (Integer)

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

#minimum_password_lengthInteger (readonly)

Minimum length to require for IAM user passwords.

Returns:

  • (Integer)

    Minimum length to require for IAM user passwords.

#password_reuse_preventionInteger (readonly)

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

Returns:

  • (Integer)

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

#require_lowercase_charactersBoolean (readonly)

Specifies whether to require lowercase characters for IAM user passwords.

Returns:

  • (Boolean)

    Specifies whether to require lowercase characters for IAM user passwords.

#require_numbersBoolean (readonly)

Specifies whether to require numbers for IAM user passwords.

Returns:

  • (Boolean)

    Specifies whether to require numbers for IAM user passwords.

#require_symbolsBoolean (readonly)

Specifies whether to require symbols for IAM user passwords.

Returns:

  • (Boolean)

    Specifies whether to require symbols for IAM user passwords.

#require_uppercase_charactersBoolean (readonly)

Specifies whether to require uppercase characters for IAM user passwords.

Returns:

  • (Boolean)

    Specifies whether to require uppercase characters for IAM user passwords.

Instance Method Details

#deleteStruct

Deletes the password policy for the AWS account. There are no parameters.

Examples:

Request syntax example with placeholder values


accountpasswordpolicy.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update(options = {}) ⇒ Struct

Updates the password policy settings for the AWS account.

  • This operation does not support partial updates. No parameters are required, but if you do not specify a parameter, that parameter's value reverts to its default value. See the Request Parameters section for each parameter's default value. Also note that some parameters do not allow the default parameter to be explicitly set. Instead, to invoke the default value, do not include that parameter when you invoke the operation.

For more information about using a password policy, see Managing an IAM Password Policy in the IAM User Guide.

Examples:

Request syntax example with placeholder values


accountpasswordpolicy.update({
  minimum_password_length: 1,
  require_symbols: false,
  require_numbers: false,
  require_uppercase_characters: false,
  require_lowercase_characters: false,
  allow_users_to_change_password: false,
  max_password_age: 1,
  password_reuse_prevention: 1,
  hard_expiry: false,
})

Options Hash (options):

  • :minimum_password_length (Integer)

    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 (Boolean)

    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 (Boolean)

    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 (Boolean)

    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 (Boolean)

    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 (Boolean)

    Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users 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 (Integer)

    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 (Integer)

    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 (Boolean)

    Prevents IAM users from setting a new password after their password has expired. The IAM user cannot be accessed 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also: