Difference between revisions of "Aws iam get-user"

From wikieduonline
Jump to navigation Jump to search
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
* https://docs.aws.amazon.com/ko_kr/cli/latest/reference/iam/get-user.html
+
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/get-user.html
  
 +
aws iam get-user
 +
aws iam get-user --user-name XXX
 +
 +
aws iam get-user --help
 +
usage: aws [-h] [--profile PROFILE] [--debug]
 +
 +
options:
 +
  -h, --help        show this help message and exit
 +
  --profile PROFILE
 +
  --debug
 +
 +
== Example ==
 
  <code>[[aws iam]] get-user</code>
 
  <code>[[aws iam]] get-user</code>
 
  <code>USER    arn:aws:iam::564057768356:user/my_user        2021-08-05T11:26:03Z    /      XXXXZCTGOUQV8KFNQ5Q3T  [[read-only]]</code>
 
  <code>USER    arn:aws:iam::564057768356:user/my_user        2021-08-05T11:26:03Z    /      XXXXZCTGOUQV8KFNQ5Q3T  [[read-only]]</code>
  
  
  An error occurred (SignatureDoesNotMatch) when calling the GetUser operation: Signature expired: 20210825T040407Z is now earlier than 20210825T075941Z (20210825T081441Z - 15 min.)
+
{
 +
    "User": {
 +
        "Path": "/",
 +
        "UserName": "Your_UserName",
 +
        "UserId": "XXXXXOFTKtttttxx",
 +
        "Arn": "arn:aws:iam::0987654321:user/Your_UserName",
 +
        "CreateDate": "2022-03-28T15:22:33+00:00"
 +
    }
 +
}
 +
 
 +
== Errors ==
 +
  An error occurred (SignatureDoesNotMatch) when calling the [[GetUser]] operation: Signature expired: 20210825T040407Z is now earlier than 20210825T075941Z (20210825T081441Z - 15 min.)
  
 
  [[aws iam]] get-user
 
  [[aws iam]] get-user
Line 12: Line 35:
  
 
  An error occurred ([[AccessDenied]]) when calling the GetUser operation: User: [[arn:aws:sts]]::0123456789:assumed- role/ROLE_NAME/YOURusername is not authorized to perform: [[iam:GetUser]] on resource:  user YOURusername
 
  An error occurred ([[AccessDenied]]) when calling the GetUser operation: User: [[arn:aws:sts]]::0123456789:assumed- role/ROLE_NAME/YOURusername is not authorized to perform: [[iam:GetUser]] on resource:  user YOURusername
 +
 +
An error occurred ([[ValidationError]]) when calling the [[GetUser]] operation: [[Must specify userName when calling with non-User credentials]]
 +
 +
An error occurred ([[NoSuchEntity]]) when calling the [[GetUser]] operation: The user with name your-not-existant-user [[cannot be found]].
  
 
== Related terms ==
 
== Related terms ==
 +
* <code>[[aws iam list-attached-user-policies]]</code>
 
* <code>[[aws configure]]</code>
 
* <code>[[aws configure]]</code>
* [[whoamiaws]]
+
* <code>[[whoamiaws]]</code> [[shell alias]]
 
* <code>[[aws iam list-account-aliases]]</code>
 
* <code>[[aws iam list-account-aliases]]</code>
 
* <code>[[aws sts get-caller-identity]]</code>
 
* <code>[[aws sts get-caller-identity]]</code>
 +
* <code>[[InvalidClientTokenId]]</code>
 +
* [[AWS IAM Identity Center]]
 +
* [[AWS Account]]
  
 
== See also ==
 
== See also ==
 
* {{aws iam}}
 
* {{aws iam}}
* {{aws cli}}
 
  
 
[[Category:AWS]]
 
[[Category:AWS]]

Latest revision as of 08:32, 24 July 2024

aws iam get-user
aws iam get-user --user-name XXX
aws iam get-user --help
usage: aws [-h] [--profile PROFILE] [--debug]

options:
  -h, --help         show this help message and exit
  --profile PROFILE
  --debug

Example[edit]

aws iam get-user
USER    arn:aws:iam::564057768356:user/my_user        2021-08-05T11:26:03Z    /       XXXXZCTGOUQV8KFNQ5Q3T   read-only


{
    "User": {
        "Path": "/",
        "UserName": "Your_UserName",
        "UserId": "XXXXXOFTKtttttxx",
        "Arn": "arn:aws:iam::0987654321:user/Your_UserName",
        "CreateDate": "2022-03-28T15:22:33+00:00"
    }
}

Errors[edit]

An error occurred (SignatureDoesNotMatch) when calling the GetUser operation: Signature expired: 20210825T040407Z is now earlier than 20210825T075941Z (20210825T081441Z - 15 min.)
aws iam get-user
An error occurred (ExpiredToken) when calling the GetUser operation: The security token included in the request is expired
An error occurred (AccessDenied) when calling the GetUser operation: User: arn:aws:sts::0123456789:assumed- role/ROLE_NAME/YOURusername is not authorized to perform: iam:GetUser on resource:  user YOURusername
An error occurred (ValidationError) when calling the GetUser operation: Must specify userName when calling with non-User credentials
An error occurred (NoSuchEntity) when calling the GetUser operation: The user with name your-not-existant-user cannot be found.

Related terms[edit]

See also[edit]

Advertising: