• 沒有找到結果。

ListUserProfiles

在文檔中 AWS CodeStar (頁 51-70)

ListUserProfiles

Lists all the user profiles configured for your AWS account in AWS CodeStar.

Request Syntax

{ "maxResults": number, "nextToken": "string"

}

Request Parameters

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

The request accepts the following data in JSON format.

maxResults (p. 45)

The maximum number of results to return in a response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No nextToken (p. 45)

The continuation token for the next set of results, if the results cannot be returned in one response.

Type: String

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

Pattern: ^[\w/+=]+$

Required: No

Response Syntax

{ "nextToken": "string", "userProfiles": [ {

"displayName": "string", "emailAddress": "string", "sshPublicKey": "string", "userArn": "string"

} ]}

Response Elements

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

Errors

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

nextToken (p. 45)

The continuation token to use when requesting the next set of results, if there are more results to be returned.

Type: String

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

Pattern: ^[\w/+=]+$

userProfiles (p. 45)

All the user profiles configured in AWS CodeStar for an AWS account.

Type: Array of UserProfileSummary (p. 78) objects

Errors

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

InvalidNextTokenException The next token is not valid.

HTTP Status Code: 400 ValidationException

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

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ListUserProfiles.

Sample Request

POST / HTTP/1.1

Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity

Content-Length: 2

X-Amz-Target: CodeStar_20170419.ListUserProfiles X-Amz-Date: 20170406T011822Z

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

{}

Sample Response

HTTP/1.1 200 OK

See Also

x-amzn-RequestId: ee7b652d-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 1473

Date: Thu, 06 Apr 2017 01:18:24 GMT {

"userProfiles":[

{

"displayName":"Jane Doe",

"emailAddress":"[email protected]", "sshPublicKey":"EXAMPLE1",

"userArn":"arn:aws:iam::111111111111:user/Jane_Doe"

}, {

"displayName":"John Doe",

"emailAddress":"[email protected]", "sshPublicKey":"EXAMPLE2",

"userArn":"arn:aws:iam::111111111111:user/John_Doe"

}, {

"displayName":"Mary Major",

"emailAddress":"[email protected]", "sshPublicKey":"EXAMPLE=",

"userArn":"arn:aws:iam::111111111111:user/Mary_Major"

}, {

"displayName":"John Stiles",

"emailAddress":"[email protected]", "sshPublicKey":"",

"userArn":"arn:aws:iam::111111111111:user/John_Stiles"

} ]}

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

TagProject

TagProject

Adds tags to a project.

Request Syntax

{ "id": "string", "tags": {

"string" : "string"

} }

Request Parameters

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

The request accepts the following data in JSON format.

id (p. 48)

The ID of the project you want to add a tag to.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 15.

Pattern: ^[a-z][a-z0-9-]+$

Required: Yes tags (p. 48)

The tags you want to add to the project.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Value Length Constraints: Maximum length of 256.

Value Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: Yes

Response Syntax

{ "tags": {

"string" : "string"

}}

Response Elements

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.

tags (p. 48)

The tags for the project.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Value Length Constraints: Maximum length of 256.

Value Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Errors

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

ConcurrentModificationException

Another modification is being made. That modification must complete before you can make your change.

HTTP Status Code: 400 LimitExceededException

A resource limit has been exceeded.

HTTP Status Code: 400 ProjectNotFoundException

The specified AWS CodeStar project 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

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

See Also

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UntagProject

UntagProject

Removes tags from a project.

Request Syntax

{

"id": "string", "tags": [ "string" ] }

Request Parameters

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

The request accepts the following data in JSON format.

id (p. 51)

The ID of the project to remove tags from.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 15.

Pattern: ^[a-z][a-z0-9-]+$

Required: Yes tags (p. 51)

The tags to remove from the project.

Type: Array of strings

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

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: Yes

Response Elements

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

Errors

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

ConcurrentModificationException

Another modification is being made. That modification must complete before you can make your change.

HTTP Status Code: 400

See Also

LimitExceededException

A resource limit has been exceeded.

HTTP Status Code: 400 ProjectNotFoundException

The specified AWS CodeStar project 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

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UpdateProject

UpdateProject

Updates a project in AWS CodeStar.

Request Syntax

{

"description": "string", "id": "string",

"name": "string"

}

Request Parameters

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

The request accepts the following data in JSON format.

description (p. 53)

The description of the project, if any.

Type: String

Length Constraints: Maximum length of 1024.

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

Required: No id (p. 53)

The ID of the project you want to update.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 15.

Pattern: ^[a-z][a-z0-9-]+$

Required: Yes name (p. 53)

The name of the project you want to update.

Type: String

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

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

Required: No

Response Elements

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

Errors

Errors

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

ProjectNotFoundException

The specified AWS CodeStar project 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

Examples

Example

This example illustrates one usage of UpdateProject.

Sample Request

POST / HTTP/1.1

Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity

Content-Length: 88

X-Amz-Target: CodeStar_20170419.UpdateProject X-Amz-Date: 20170406T003323Z

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

{"id": "my-first-projec", "description": "Updating the project by adding a description"}

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: a5afbdc6-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 2

Date: Thu, 06 Apr 2017 00:33:25 GMT {}

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

See Also

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UpdateTeamMember

UpdateTeamMember

Updates a team member's attributes in an AWS CodeStar project. For example, you can change a team member's role in the project, or change whether they have remote access to project resources.

Request Syntax

{ "projectId": "string", "projectRole": "string", "remoteAccessAllowed": boolean, "userArn": "string"

}

Request Parameters

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

The request accepts the following data in JSON format.

projectId (p. 56)

The ID of the project.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 15.

Pattern: ^[a-z][a-z0-9-]+$

Required: Yes projectRole (p. 56)

The role assigned to the user in the project. Project roles have different levels of access. For more information, see Working with Teams in the AWS CodeStar User Guide.

Type: String

Pattern: ^(Owner|Viewer|Contributor)$

Required: No

remoteAccessAllowed (p. 56)

Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.

Type: Boolean Required: No userArn (p. 56)

The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.

Type: String

Response Syntax

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

{

"projectRole": "string", "remoteAccessAllowed": boolean, "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.

projectRole (p. 57)

The project role granted to the user.

Type: String

Pattern: ^(Owner|Viewer|Contributor)$

remoteAccessAllowed (p. 57)

Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile.

Type: Boolean userArn (p. 57)

The Amazon Resource Name (ARN) of the user whose team membership attributes were updated.

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 (p. 82).

ConcurrentModificationException

Another modification is being made. That modification must complete before you can make your change.

HTTP Status Code: 400

Examples

InvalidServiceRoleException The service role is not valid.

HTTP Status Code: 400 LimitExceededException

A resource limit has been exceeded.

HTTP Status Code: 400 ProjectConfigurationException

Project configuration information is required but not specified.

HTTP Status Code: 400 ProjectNotFoundException

The specified AWS CodeStar project was not found.

HTTP Status Code: 400 TeamMemberNotFoundException

The specified team member 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

Examples

Example

This example illustrates one usage of UpdateTeamMember.

Sample Request

POST / HTTP/1.1

Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity

Content-Length: 152

X-Amz-Target: CodeStar_20170419.UpdateTeamMember X-Amz-Date: 20170406T035631Z

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

{

"projectRole": "Contributor", "projectId": "my-first-projec", "remoteAccessAllowed": false,

"userArn": "arn:aws:iam::111111111111:user/John_Doe"

}

See Also

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: 06343b93-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 115

Date: Thu, 06 Apr 2017 03:56:33 GMT { "projectRole":"Contributor", "remoteAccessAllowed":false,

"userArn":"arn:aws:iam::111111111111:user/John_Doe"

}

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UpdateUserProfile

UpdateUserProfile

Updates a user's profile in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar.

Request Syntax

{ "displayName": "string", "emailAddress": "string", "sshPublicKey": "string", "userArn": "string"

}

Request Parameters

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

The request accepts the following data in JSON format.

displayName (p. 60)

The name that is displayed as the friendly name for the user in AWS CodeStar.

Type: String

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

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

Required: No emailAddress (p. 60)

The email address that is displayed as part of the user's profile in AWS CodeStar.

Type: String

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

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

Required: No sshPublicKey (p. 60)

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.

Type: String

Length Constraints: Maximum length of 16384.

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

Required: No

Response Syntax

userArn (p. 60)

The name that will be displayed as the friendly name for the user in AWS CodeStar.

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 (p. 61)

The date the user profile was created, in timestamp format.

Type: Timestamp displayName (p. 61)

The name that is displayed as the friendly name for the user in AWS CodeStar.

Type: String

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

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

emailAddress (p. 61)

The email address that is displayed as part of the user's profile in AWS CodeStar.

Type: String

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

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

lastModifiedTimestamp (p. 61)

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

Type: Timestamp

Errors

sshPublicKey (p. 61)

The SSH public key associated with the user in AWS CodeStar. This is the public portion of the public/private keypair the user can use to access project resources if a project owner allows the user remote access to those resources.

Type: String

Length Constraints: Maximum length of 16384.

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

userArn (p. 61)

The Amazon Resource Name (ARN) of the user in IAM.

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 (p. 82).

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

Examples

Example

This example illustrates one usage of UpdateUserProfile.

Sample Request

POST / HTTP/1.1

Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity

Content-Length: 92

X-Amz-Target: CodeStar_20170419.UpdateUserProfile X-Amz-Date: 20170406T013847Z

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

See Also

{"displayName": "Jane Mary Doe", "userArn": "arn:aws:iam::111111111111:user/Jane_Doe"}

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: c8f7ca6e-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 1094

Date: Thu, 06 Apr 2017 01:38:50 GMT { "createdTimestamp":1.491439687681E9, "displayName":"Jane Mary Doe",

"emailAddress":"[email protected]", "lastModifiedTimestamp":1.491442730598E9, "sshPublicKey":"EXAMPLE1",

"userArn":"arn:aws:iam::111111111111:user/Jane_Doe"

}

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

在文檔中 AWS CodeStar (頁 51-70)

相關文件