amazonka-iam-2.0: Amazon Identity and Access Management SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.IAM.UpdateAccessKey

Description

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

If the UserName is not specified, the user name is determined implicitly based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is used, then UserName is required. If a long-term key is assigned to the user, then UserName is not required. This operation works for access keys under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated users.

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

Synopsis

Creating a Request

data UpdateAccessKey Source #

See: newUpdateAccessKey smart constructor.

Constructors

UpdateAccessKey' 

Fields

  • userName :: Maybe Text

    The name of the user whose key you want to update.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

  • accessKeyId :: AccessKey

    The access key ID of the secret access key you want to update.

    This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.

  • status :: StatusType

    The status you want to assign to the secret access key. Active means that the key can be used for programmatic calls to Amazon Web Services, while Inactive means that the key cannot be used.

Instances

Instances details
ToHeaders UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

ToPath UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

ToQuery UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

AWSRequest UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type AWSResponse UpdateAccessKey #

Generic UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type Rep UpdateAccessKey :: Type -> Type #

Read UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Show UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

NFData UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Methods

rnf :: UpdateAccessKey -> () #

Eq UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Hashable UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type AWSResponse UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKey = D1 ('MetaData "UpdateAccessKey" "Amazonka.IAM.UpdateAccessKey" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "UpdateAccessKey'" 'PrefixI 'True) (S1 ('MetaSel ('Just "userName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "accessKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccessKey) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StatusType))))

newUpdateAccessKey Source #

Create a value of UpdateAccessKey with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

UpdateAccessKey, updateAccessKey_userName - The name of the user whose key you want to update.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

UpdateAccessKey, updateAccessKey_accessKeyId - The access key ID of the secret access key you want to update.

This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.

UpdateAccessKey, updateAccessKey_status - The status you want to assign to the secret access key. Active means that the key can be used for programmatic calls to Amazon Web Services, while Inactive means that the key cannot be used.

Request Lenses

updateAccessKey_userName :: Lens' UpdateAccessKey (Maybe Text) Source #

The name of the user whose key you want to update.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

updateAccessKey_accessKeyId :: Lens' UpdateAccessKey AccessKey Source #

The access key ID of the secret access key you want to update.

This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.

updateAccessKey_status :: Lens' UpdateAccessKey StatusType Source #

The status you want to assign to the secret access key. Active means that the key can be used for programmatic calls to Amazon Web Services, while Inactive means that the key cannot be used.

Destructuring the Response

data UpdateAccessKeyResponse Source #

See: newUpdateAccessKeyResponse smart constructor.

Instances

Instances details
Generic UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type Rep UpdateAccessKeyResponse :: Type -> Type #

Read UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Show UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

NFData UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Methods

rnf :: UpdateAccessKeyResponse -> () #

Eq UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKeyResponse = D1 ('MetaData "UpdateAccessKeyResponse" "Amazonka.IAM.UpdateAccessKey" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "UpdateAccessKeyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newUpdateAccessKeyResponse :: UpdateAccessKeyResponse Source #

Create a value of UpdateAccessKeyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.