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.EnableMFADevice

Description

Enables the specified MFA device and associates it with the specified IAM user. When enabled, the MFA device is required for every subsequent login by the IAM user associated with the device.

Synopsis

Creating a Request

data EnableMFADevice Source #

See: newEnableMFADevice smart constructor.

Constructors

EnableMFADevice' 

Fields

  • userName :: Text

    The name of the IAM user for whom you want to enable the MFA device.

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

  • serialNumber :: Text

    The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.

    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: =,.@:/-

  • authenticationCode1 :: Text

    An authentication code emitted by the device.

    The format for this parameter is a string of six digits.

    Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

  • authenticationCode2 :: Text

    A subsequent authentication code emitted by the device.

    The format for this parameter is a string of six digits.

    Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

Instances

Instances details
Eq EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Read EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Show EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Generic EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Associated Types

type Rep EnableMFADevice :: Type -> Type #

NFData EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Methods

rnf :: EnableMFADevice -> () #

Hashable EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

AWSRequest EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Associated Types

type AWSResponse EnableMFADevice #

ToHeaders EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

ToPath EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

ToQuery EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

type Rep EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

type Rep EnableMFADevice = D1 ('MetaData "EnableMFADevice" "Amazonka.IAM.EnableMFADevice" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "EnableMFADevice'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "userName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "serialNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "authenticationCode1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "authenticationCode2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse EnableMFADevice Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

newEnableMFADevice Source #

Create a value of EnableMFADevice 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:EnableMFADevice', enableMFADevice_userName - The name of the IAM user for whom you want to enable the MFA device.

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:serialNumber:EnableMFADevice', enableMFADevice_serialNumber - The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.

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:authenticationCode1:EnableMFADevice', enableMFADevice_authenticationCode1 - An authentication code emitted by the device.

The format for this parameter is a string of six digits.

Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

$sel:authenticationCode2:EnableMFADevice', enableMFADevice_authenticationCode2 - A subsequent authentication code emitted by the device.

The format for this parameter is a string of six digits.

Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

Request Lenses

enableMFADevice_userName :: Lens' EnableMFADevice Text Source #

The name of the IAM user for whom you want to enable the MFA device.

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

enableMFADevice_serialNumber :: Lens' EnableMFADevice Text Source #

The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.

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: =,.@:/-

enableMFADevice_authenticationCode1 :: Lens' EnableMFADevice Text Source #

An authentication code emitted by the device.

The format for this parameter is a string of six digits.

Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

enableMFADevice_authenticationCode2 :: Lens' EnableMFADevice Text Source #

A subsequent authentication code emitted by the device.

The format for this parameter is a string of six digits.

Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.

Destructuring the Response

data EnableMFADeviceResponse Source #

See: newEnableMFADeviceResponse smart constructor.

Instances

Instances details
Eq EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Read EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Show EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Generic EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Associated Types

type Rep EnableMFADeviceResponse :: Type -> Type #

NFData EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

Methods

rnf :: EnableMFADeviceResponse -> () #

type Rep EnableMFADeviceResponse Source # 
Instance details

Defined in Amazonka.IAM.EnableMFADevice

type Rep EnableMFADeviceResponse = D1 ('MetaData "EnableMFADeviceResponse" "Amazonka.IAM.EnableMFADevice" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "EnableMFADeviceResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newEnableMFADeviceResponse :: EnableMFADeviceResponse Source #

Create a value of EnableMFADeviceResponse with all optional fields omitted.

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