AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

EnableMFADeviceInput

import "github.com/aws/aws-sdk-go/service/iam"

type EnableMFADeviceInput struct { AuthenticationCode1 *string `min:"6" type:"string" required:"true"` AuthenticationCode2 *string `min:"6" type:"string" required:"true"` SerialNumber *string `min:"9" type:"string" required:"true"` UserName *string `min:"1" type:"string" required:"true"` }

AuthenticationCode1

Type: *string

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 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html).

AuthenticationCode1 is a required field

AuthenticationCode2

Type: *string

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 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html).

AuthenticationCode2 is a required field

SerialNumber

Type: *string

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 (http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/-

SerialNumber is a required field

UserName

Type: *string

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

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

UserName is a required field

Method

GoString

func (s EnableMFADeviceInput) GoString() string

GoString returns the string representation

SetAuthenticationCode1

func (s *EnableMFADeviceInput) SetAuthenticationCode1(v string) *EnableMFADeviceInput

SetAuthenticationCode1 sets the AuthenticationCode1 field's value.

SetAuthenticationCode2

func (s *EnableMFADeviceInput) SetAuthenticationCode2(v string) *EnableMFADeviceInput

SetAuthenticationCode2 sets the AuthenticationCode2 field's value.

SetSerialNumber

func (s *EnableMFADeviceInput) SetSerialNumber(v string) *EnableMFADeviceInput

SetSerialNumber sets the SerialNumber field's value.

SetUserName

func (s *EnableMFADeviceInput) SetUserName(v string) *EnableMFADeviceInput

SetUserName sets the UserName field's value.

String

func (s EnableMFADeviceInput) String() string

String returns the string representation

Validate

func (s *EnableMFADeviceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: