Skip to content

describe_premium_repositories async

describe_premium_repositories(
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
    repository_names: Optional[RepositoryNameList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribePremiumRepositoriesResponse

Describes the premium repositories in a public registry, including their Amazon Web Services Marketplace products, associated repositories, and state. Repositories in the DRAFT, AVAILABLE, and HIDDEN states are returned.

Parameters:

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

    The Amazon Web Services account ID that's associated with the public registry that contains the premium repositories to describe. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.

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

    The names of the premium repositories to describe. If this parameter isn't specified, all premium repositories in the registry are described. If you specify repository names, you can't use maxResults or nextToken.

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

    The maximum number of results that DescribePremiumRepositories returns in paginated output. When you use this parameter, DescribePremiumRepositories returns only maxResults results in a single page along with a nextToken response element. To see the remaining results, send another DescribePremiumRepositories request with the returned nextToken value. You can specify a value between 1 and 1000. If you don't use this parameter, DescribePremiumRepositories returns up to 100 results and a nextToken value, if applicable.

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

    The nextToken value that's returned from a previous paginated DescribePremiumRepositories request where you used maxResults 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.

    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.

Raises:

  • InvalidParameterException –

    The specified parameter is invalid. Review the available parameters for the API request.

  • LimitExceededException –

    The operation didn't succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Public service quotas in the Amazon Elastic Container Registry Public User Guide.

  • RepositoryNotFoundException –

    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.

  • ServerException –

    These errors are usually caused by a server-side issue. Retry the request. If it continues to fail, contact Amazon Web Services Support.

  • UnsupportedCommandException –

    The action isn't supported in this Region. Check that the action is available in the Amazon Web Services Region that you're using, and try again in a supported Region.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To describe the premium repositories in a registry This example describes all of the premium repositories in your default registry.

>>> await client.describe_premium_repositories()
Source code in docs_src/capo_ecr_public/_services/async_ecrpublic.py
async def describe_premium_repositories(
    self,
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional["capo_ecr_public.types.registry_id.RegistryId"] = None,
    repository_names: Optional[
        "capo_ecr_public.types.repository_name_list.RepositoryNameList"
    ] = None,
    max_results: Optional["capo_ecr_public.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_ecr_public.types.next_token.NextToken"] = None,
) -> "capo_ecr_public.types.describe_premium_repositories_response.DescribePremiumRepositoriesResponse":
    """<p>Describes the premium repositories in a public registry, including their Amazon Web Services Marketplace products, associated repositories, and state. Repositories in the <code>DRAFT</code>, <code>AVAILABLE</code>, and <code>HIDDEN</code> states are returned.</p>

    Args:
        registry_id: <p>The Amazon Web Services account ID that's associated with the public registry that contains the premium repositories to describe. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.</p>
        repository_names: <p>The names of the premium repositories to describe. If this parameter isn't specified, all premium repositories in the registry are described. If you specify repository names, you can't use <code>maxResults</code> or <code>nextToken</code>.</p>
        max_results: <p>The maximum number of results that <code>DescribePremiumRepositories</code> returns in paginated output. When you use this parameter, <code>DescribePremiumRepositories</code> returns only <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. To see the remaining results, send another <code>DescribePremiumRepositories</code> request with the returned <code>nextToken</code> value. You can specify a value between 1 and 1000. If you don't use this parameter, <code>DescribePremiumRepositories</code> returns up to 100 results and a <code>nextToken</code> value, if applicable.</p>
        next_token: <p>The <code>nextToken</code> value that's returned from a previous paginated <code>DescribePremiumRepositories</code> request where you used <code>maxResults</code> 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>.</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>

    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.limit_exceeded_exception.LimitExceededException: <p>The operation didn't succeed because it would have exceeded a service limit for your account. For more information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/public/public-service-quotas.html">Amazon ECR Public service quotas</a> in the Amazon Elastic Container Registry Public User Guide.</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. Retry the request. If it continues to fail, contact Amazon Web Services Support.</p>
        capo_ecr_public.errors.unsupported_command_exception.UnsupportedCommandException: <p>The action isn't supported in this Region. Check that the action is available in the Amazon Web Services Region that you're using, and try again in a supported Region.</p>
        capo_ecr_public.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe the premium repositories in a registry
        This example describes all of the premium repositories in your default registry.

        >>> await client.describe_premium_repositories()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr_public.types.describe_premium_repositories_request.DescribePremiumRepositoriesRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr_public.types.describe_premium_repositories_response.DescribePremiumRepositoriesResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.describe_premium_repositories

        (
            output,
            http_response,
        ) = await capo_ecr_public._operations.spencer_frontend_service.describe_premium_repositories.async_describe_premium_repositories(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePremiumRepositories")
    )
    input_: capo_ecr_public.types.describe_premium_repositories_request.DescribePremiumRepositoriesRequest = {}
    if registry_id is not None:
        input_["registry_id"] = registry_id
    if repository_names is not None:
        input_["repository_names"] = repository_names
    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