libZSservicesZSamazonka-iamZSamazonka-iam
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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. 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
Eq UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Read UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Show UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Generic UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type Rep UpdateAccessKey :: Type -> Type #

NFData UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Methods

rnf :: UpdateAccessKey -> () #

Hashable UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

AWSRequest UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type AWSResponse UpdateAccessKey #

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

type Rep UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKey = D1 ('MetaData "UpdateAccessKey" "Amazonka.IAM.UpdateAccessKey" "libZSservicesZSamazonka-iamZSamazonka-iam" '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))))
type AWSResponse UpdateAccessKey Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

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:

$sel:userName: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: _+=,.@-

$sel:accessKeyId: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.

$sel:status: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
Eq UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Read UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Show UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Generic UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Associated Types

type Rep UpdateAccessKeyResponse :: Type -> Type #

NFData UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

Methods

rnf :: UpdateAccessKeyResponse -> () #

type Rep UpdateAccessKeyResponse Source # 
Instance details

Defined in Amazonka.IAM.UpdateAccessKey

type Rep UpdateAccessKeyResponse = D1 ('MetaData "UpdateAccessKeyResponse" "Amazonka.IAM.UpdateAccessKey" "libZSservicesZSamazonka-iamZSamazonka-iam" '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.