Skip to content

describe_repositories

describe_repositories(
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
    repository_names: Optional[RepositoryNameList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeRepositoriesResponse

Describes repositories that are in a public registry.

Parameters:

  • registry_id (Optional[RegistryId], default: None ) –

    The Amazon Web Services account ID that's associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.

  • repository_names (Optional[RepositoryNameList], default: None ) –

    A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.

  • next_token (Optional[NextToken], default: None ) –

    The nextToken value that's returned from a previous paginated DescribeRepositories request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. If there are no more results to return, this value is null. If you specify repositories with repositoryNames, you can't use this option.

    This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of repository results that's returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. If you specify repositories with repositoryNames, you can't use this option.

Raises:

Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
def describe_repositories(
    self,
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = None,
    registry_id: Optional["capo_ecr_public.types.registry_id.RegistryId"] = None,
    repository_names: Optional[
        "capo_ecr_public.types.repository_name_list.RepositoryNameList"
    ] = None,
    next_token: Optional["capo_ecr_public.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ecr_public.types.max_results.MaxResults"] = None,
) -> "capo_ecr_public.types.describe_repositories_response.DescribeRepositoriesResponse":
    """<p>Describes repositories that are in a public registry.</p>

    Args:
        registry_id: <p>The Amazon Web Services account ID that's associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.</p>
        repository_names: <p>A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.</p>
        next_token: <p>The <code>nextToken</code> value that's returned from a previous paginated <code>DescribeRepositories</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. If there are no more results to return, this value is <code>null</code>. If you specify repositories with <code>repositoryNames</code>, you can't use this option.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>
        max_results: <p>The maximum number of repository results that's returned by <code>DescribeRepositories</code> in paginated output. When this parameter is used, <code>DescribeRepositories</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. You can see the remaining results of the initial request by sending another <code>DescribeRepositories</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter isn't used, then <code>DescribeRepositories</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. If you specify repositories with <code>repositoryNames</code>, you can't use this option.</p>

    Raises:
        capo_ecr_public.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_ecr_public.errors.repository_not_found_exception.RepositoryNotFoundException: <p>The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.</p>
        capo_ecr_public.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_ecr_public.errors.unsupported_command_exception.UnsupportedCommandException: <p>The action isn't supported in this Region.</p>
        capo_ecr_public.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ecr_public.types.describe_repositories_request.DescribeRepositoriesRequest]",
    ) -> OperationResponse[
        "capo_ecr_public.types.describe_repositories_response.DescribeRepositoriesResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.describe_repositories

        output, http_response = (
            capo_ecr_public._operations.spencer_frontend_service.describe_repositories.describe_repositories(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeRepositories")
    )
    input_: capo_ecr_public.types.describe_repositories_request.DescribeRepositoriesRequest = {}
    if registry_id is not None:
        input_["registry_id"] = registry_id
    if repository_names is not None:
        input_["repository_names"] = repository_names
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output