ListProjects - AWS CodeStar

On July 31, 2024, Amazon Web Services (AWS) will discontinue support for creating and viewing AWS CodeStar projects. After July 31, 2024, you will no longer be able to access the AWS CodeStar console or create new projects. However, the AWS resources created by AWS CodeStar, including your source repositories, pipelines, and builds, will be unaffected by this change and will continue to function. AWS CodeStar Connections will not be impacted by this discontinuation.

 

If you wish to track work, develop code, and build, test, and deploy your applications, Amazon CodeCatalyst provides a streamlined getting started process and additional functionality to manage your software projects. Learn more about functionality and pricing of Amazon CodeCatalyst.

ListProjects

Lists all projects in AWS CodeStar associated with your AWS account.

Request Syntax

{ "maxResults": number, "nextToken": "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.

maxResults

The maximum amount of data that can be contained in a single set of results.

Type: Integer

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

Required: No

nextToken

The continuation token to be used to return 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", "projects": [ { "projectArn": "string", "projectId": "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.

nextToken

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/+=]+$

projects

A list of projects.

Type: Array of ProjectSummary objects

Errors

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

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 ListProjects.

Sample Request

POST / HTTP/1.1 Host: codestar.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 2 X-Amz-Target: CodeStar_20170419.ListProjects X-Amz-Date: 20170405T221321Z 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/20170405/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 x-amzn-RequestId: 15f549f8-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 343 Date: Wed, 05 Apr 2017 22:13:24 GMT {"projects": [ { "projectArn":"arn:aws:codestar:us-east-1:111111111111:project/my-2nd-project", "projectId":"my-2nd-project" }, { "projectArn":"arn:aws:codestar:us-east-1:111111111111:project/my-first-projec", "projectId":"my-first-projec" } ] }

See Also

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