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

Class: Aws::IAM::AccessKey

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

Overloads:

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

    Parameters:

    • user_name (String)
    • id (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)
    • :id (required, String)
    • :client (Client)

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

Instance Attribute Details

#access_key_idString (readonly)

The ID for this access key.

Returns:

  • (String)

    The ID for this access key.

#create_dateTime (readonly)

The date when the access key was created.

Returns:

  • (Time)

    The date when the access key was created.

#idString (readonly)

Returns:

  • (String)

#statusString (readonly)

The status of the access key. Active means the key is valid for API calls; Inactive means it is not.

Possible values:

  • Active
  • Inactive

Returns:

  • (String)

    The status of the access key.

#user_nameString (readonly)

Returns:

  • (String)

Instance Method Details

#activateStruct

Changes the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user's key as part of a key rotation work flow.

If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.

For information about rotating keys, see Managing Keys and Certificates in the IAM User Guide.

Examples:

Request syntax example with placeholder values


accesskey.activate()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deactivateStruct

Changes the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user's key as part of a key rotation work flow.

If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.

For information about rotating keys, see Managing Keys and Certificates in the IAM User Guide.

Examples:

Request syntax example with placeholder values


accesskey.deactivate()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deleteStruct

Deletes the access key pair associated with the specified IAM user.

If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.

Examples:

Request syntax example with placeholder values


accesskey.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#userUser

Returns: