Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified Amazon Web Services account and that matches the input parameters.
Parameters:
-
repository_prefix
(Optional[RepositoryName], default:
None
)
–
A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.
-
max_results
(Optional[ListRepositoriesMaxResults], default:
None
)
–
The maximum number of results to return per page.
-
next_token
(Optional[PaginationToken], default:
None
)
–
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
Raises:
-
AccessDeniedException
–
The operation did not succeed because of an unauthorized access attempt.
-
InternalServerException
–
The operation did not succeed because of an error that occurred inside CodeArtifact.
-
ThrottlingException
–
The operation did not succeed because too many requests are sent to the service.
-
ValidationException
–
The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/async_codeartifact.py
| async def list_repositories(
self,
*,
config_overrides: Optional[AsynccodeartifactClientConfig] = None,
repository_prefix: Optional[
"capo_codeartifact.types.repository_name.RepositoryName"
] = None,
max_results: Optional[
"capo_codeartifact.types.list_repositories_max_results.ListRepositoriesMaxResults"
] = None,
next_token: Optional[
"capo_codeartifact.types.pagination_token.PaginationToken"
] = None,
) -> "capo_codeartifact.types.list_repositories_result.ListRepositoriesResult":
"""<p> Returns a list of <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_RepositorySummary.html">RepositorySummary</a> objects. Each <code>RepositorySummary</code> contains information about a repository in the specified Amazon Web Services account and that matches the input parameters. </p>
Args:
repository_prefix: <p> A prefix used to filter returned repositories. Only repositories with names that start with <code>repositoryPrefix</code> are returned.</p>
max_results: <p> The maximum number of results to return per page. </p>
next_token: <p> The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
Raises:
capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codeartifact.types.list_repositories_request.ListRepositoriesRequest]",
) -> AsyncOperationResponse[
"capo_codeartifact.types.list_repositories_result.ListRepositoriesResult"
]:
import capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories
(
output,
http_response,
) = await capo_codeartifact._operations.code_artifact_control_plane_service.list_repositories.async_list_repositories(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRepositories")
)
input_: capo_codeartifact.types.list_repositories_request.ListRepositoriesRequest = {}
if repository_prefix is not None:
input_["repository_prefix"] = repository_prefix
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|