选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

ListRepositories - AWS CodeCommit
此页面尚未翻译为您的语言。 请求翻译

ListRepositories

Gets information about one or more repositories.

Request Syntax

{ "nextToken": "string", "order": "string", "sortBy": "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.

nextToken

An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

Type: String

Required: No

order

The order in which to sort the results of a list repositories operation.

Type: String

Valid Values: ascending | descending

Required: No

sortBy

The criteria used to sort the results of a list repositories operation.

Type: String

Valid Values: repositoryName | lastModifiedDate

Required: No

Response Syntax

{ "nextToken": "string", "repositories": [ { "repositoryId": "string", "repositoryName": "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

An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

Type: String

repositories

Lists the repositories called by the list repositories operation.

Type: Array of RepositoryNameIdPair objects

Errors

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

InvalidContinuationTokenException

The specified continuation token is not valid.

HTTP Status Code: 400

InvalidOrderException

The specified sort order is not valid.

HTTP Status Code: 400

InvalidSortByException

The specified sort by value is not valid.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ListRepositories.

Sample Request

POST / HTTP/1.1 Host: codecommit.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 2 X-Amz-Target: CodeCommit_20150413.ListRepositories X-Amz-Date: 20151028T212036Z User-Agent: aws-cli/1.7.38 Python/2.7.9 Windows/7 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAI44QH8DHBEXAMPLE/20151028/us-east-1/codecommit/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-date;x-amz-target, Signature=8d9b5998EXAMPLE {}

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 0728aaa8-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 721 Date: Wed, 28 Oct 2015 21:20:37 GMT { "repositories":[ { "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", "repositoryName": "MyDemoRepo" }, { "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE" "repositoryName": "MyOtherDemoRepo" } ] }

See Also

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

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。