Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.GetUser C# (CSharp) Method

GetUser() public method

Retrieves information about the specified IAM user, including the user's creation date, path, unique ID, and ARN.

If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request to this API.

/// The request was rejected because it referenced an entity that does not exist. The /// error message describes the entity. /// /// The request processing has failed because of an unknown error, exception or failure. ///
public GetUser ( ) : GetUserResponse
return GetUserResponse
        public GetUserResponse GetUser()
        {
            return GetUser(new GetUserRequest());
        }

Same methods

AmazonIdentityManagementServiceClient::GetUser ( GetUserRequest request ) : GetUserResponse

Usage Example

 public void CheckWeAreRunningAsTheSpecialUser()
 {
     ConfigurationManager.AppSettings["AWSProfileName"] = "aws-tools-tests";
     var iamClient = new AmazonIdentityManagementServiceClient();
     var me = iamClient.GetUser();
     Assert.That(me.User.UserName, Is.EqualTo("aws-tools-tests"));
 }
All Usage Examples Of Amazon.IdentityManagement.AmazonIdentityManagementServiceClient::GetUser
AmazonIdentityManagementServiceClient