Menu
AWS CodeStar
API Reference (API Version 2017-04-19)

DescribeUserProfile

Describes a user in AWS CodeStar and the user attributes across all projects.

Request Syntax

{ "userArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

userArn

The Amazon Resource Name (ARN) of the user.

Type: String

Length Constraints: Minimum length of 32. Maximum length of 95.

Pattern: ^arn:aws:iam::\d{12}:user(?:(\u002F)|(\u002F[\u0021-\u007E]+\u002F))[\w+=,.@-]+$

Required: Yes

Response Syntax

{ "createdTimestamp": number, "displayName": "string", "emailAddress": "string", "lastModifiedTimestamp": number, "sshPublicKey": "string", "userArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdTimestamp

The date and time when the user profile was created in AWS CodeStar, in timestamp format.

Type: Timestamp

displayName

The display name shown for the user in AWS CodeStar projects. For example, this could be set to both first and last name ("Mary Major") or a single name ("Mary"). The display name is also used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the display name, the first character that appears after the space will be used as the second character in the user initial icon. The initial icon displays a maximum of two characters, so a display name with more than one space (for example "Mary Jane Major") would generate an initial icon using the first character and the first character after the space ("MJ", not "MM").

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^\S(.*\S)?$

emailAddress

The email address for the user. Optional.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[\w-.+]+@[\w-.+]+$

lastModifiedTimestamp

The date and time when the user profile was last modified, in timestamp format.

Type: Timestamp

sshPublicKey

The SSH public key associated with the user. This SSH public key is associated with the user profile, and can be used in conjunction with the associated private key for access to project resources, such as Amazon EC2 instances, if a project owner grants remote access to those resources.

Type: String

Length Constraints: Maximum length of 16384.

Pattern: ^[\t\r\n\u0020-\u00FF]*$

userArn

The Amazon Resource Name (ARN) of the user.

Type: String

Length Constraints: Minimum length of 32. Maximum length of 95.

Pattern: ^arn:aws:iam::\d{12}:user(?:(\u002F)|(\u002F[\u0021-\u007E]+\u002F))[\w+=,.@-]+$

Errors

For information about the errors that are common to all actions, see Common Errors.

UserProfileNotFoundException

The user profile was not found.

HTTP Status Code: 400

ValidationException

The specified input is either not valid, or it could not be validated.

HTTP Status Code: 400

Example

Sample Request

POST / HTTP/1.1 Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 55 X-Amz-Target: CodeStar_20170419.DescribeUserProfile X-Amz-Date: 20170406T013327Z User-Agent: aws-cli/1.11.36 Python/2.7.9 Windows/7 botocore/1.4.93 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AIDACKCEVSQ6C2EXAMPLE/20170406/us-east-1/codestar/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=c25ddcd5EXAMPLE {"userArn": "arn:aws:iam::111111111111:user/Mary_Major"}

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 0a095029-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 216 Date: Thu, 06 Apr 2017 01:33:30 GMT { "createdTimestamp":1.490634364532E9, "displayName":"Mary Major", "emailAddress":"mary.major@example.com", "lastModifiedTimestamp":1.491001935261E9, "sshPublicKey":"", "userArn":"arn:aws:iam::111111111111:user/Mary_Major" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: