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.

User

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

type User struct { Arn *string `min:"20" type:"string" required:"true"` CreateDate *time.Time `type:"timestamp" required:"true"` PasswordLastUsed *time.Time `type:"timestamp"` Path *string `min:"1" type:"string" required:"true"` PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` Tags []*Tag `type:"list"` UserId *string `min:"16" type:"string" required:"true"` UserName *string `min:"1" type:"string" required:"true"` }

Contains information about an IAM user entity.

This data type is used as a response element in the following operations:

  • CreateUser

  • GetUser

  • ListUsers

Arn

Type: *string

The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) in the Using IAM guide.

Arn is a required field

CreateDate

Type: *time.Time

The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), when the user was created.

CreateDate is a required field

PasswordLastUsed

Type: *time.Time

The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because:

  • The user never had a password.

  • A password exists but has not been used since IAM started tracking this information on October 20, 2014.

A null valuedoes not mean that the user never had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used.

This value is returned only in the GetUser and ListUsers operations.

Path

Type: *string

The path to the user. For more information about paths, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) in the Using IAM guide.

Path is a required field

PermissionsBoundary

Contains information about an attached permissions boundary.

An attached permissions boundary is a managed policy that has been attached to a user or role to set the permissions boundary.

For more information about permissions boundaries, see Permissions Boundaries for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the IAM User Guide.

Tags

A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see Tagging IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the IAM User Guide.

UserId

Type: *string

The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) in the Using IAM guide.

UserId is a required field

UserName

Type: *string

The friendly name identifying the user.

UserName is a required field

Method

GoString

func (s User) GoString() string

GoString returns the string representation

SetArn

func (s *User) SetArn(v string) *User

SetArn sets the Arn field's value.

SetCreateDate

func (s *User) SetCreateDate(v time.Time) *User

SetCreateDate sets the CreateDate field's value.

SetPasswordLastUsed

func (s *User) SetPasswordLastUsed(v time.Time) *User

SetPasswordLastUsed sets the PasswordLastUsed field's value.

SetPath

func (s *User) SetPath(v string) *User

SetPath sets the Path field's value.

SetPermissionsBoundary

func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User

SetPermissionsBoundary sets the PermissionsBoundary field's value.

SetTags

func (s *User) SetTags(v []*Tag) *User

SetTags sets the Tags field's value.

SetUserId

func (s *User) SetUserId(v string) *User

SetUserId sets the UserId field's value.

SetUserName

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

SetUserName sets the UserName field's value.

String

func (s User) String() string

String returns the string representation

On this page: