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

Class: Aws::IAM::LoginProfile

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(user_name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(user_name, options = {}) ⇒ Object

    Parameters:

    • user_name (String)

    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):

    • :user_name (required, String)
    • :client (Client)

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

Instance Attribute Details

#create_dateTime (readonly)

The date when the password for the user was created.

Returns:

  • (Time)

    The date when the password for the user was created.

#password_reset_requiredBoolean (readonly)

Specifies whether the user is required to set a new password on next sign-in.

Returns:

  • (Boolean)

    Specifies whether the user is required to set a new password on next sign-in.

#user_nameString (readonly)

Returns:

  • (String)

Instance Method Details

#create(options = {}) ⇒ LoginProfile

Examples:

Request syntax example with placeholder values


loginprofile.create({
  password: "passwordType", # required
  password_reset_required: false,
})

Basic usage

loginprofile = loginprofile.create(options)
loginprofile.user_name
#=> "loginprofile-user-name"

Options Hash (options):

  • :password (required, String)

    The new password for the user.

    The regex pattern that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (\u0020) through the end of the ASCII character range (\u00FF). You can also include the tab (\u0009), line feed (\u000A), and carriage return (\u000D) characters. Any of these characters are valid in a password. However, many tools, such as the AWS Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.

  • :password_reset_required (Boolean)

    Specifies whether the user is required to set a new password on next sign-in.

Returns:

See Also:

#deleteStruct

Deletes the password for the specified IAM user, which terminates the user's ability to access AWS services through the AWS Management Console.

Deleting a user's password does not prevent a user from accessing AWS through the command line interface or the API. To prevent all user access, you must also either make any access keys inactive or delete them. For more information about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey.

Examples:

Request syntax example with placeholder values


loginprofile.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update(options = {}) ⇒ Struct

Changes the password for the specified IAM user.

IAM users can change their own passwords by calling ChangePassword. For more information about modifying passwords, see Managing Passwords in the IAM User Guide.

Examples:

Request syntax example with placeholder values


loginprofile.update({
  password: "passwordType",
  password_reset_required: false,
})

Options Hash (options):

  • :password (String)

    The new password for the specified IAM user.

    The regex pattern used to validate this parameter is a string of characters consisting of the following:

    • Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range

    • The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF)

    • The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D)

    However, the format can be further restricted by the account administrator by setting a password policy on the AWS account. For more information, see UpdateAccountPasswordPolicy.

  • :password_reset_required (Boolean)

    Allows this new password to be used only once by requiring the specified IAM user to set a new password on next sign-in.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#userUser

Returns: