Skip to content

describe_entitled_repositories

describe_entitled_repositories(
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeEntitledRepositoriesResponse

Returns the premium repositories that you're entitled to through your active Amazon Web Services Marketplace purchases. Amazon ECR looks up your purchases by calling the Amazon Web Services Marketplace SearchAgreements operation on your behalf, so you need permission for the aws-marketplace:SearchAgreements action in addition to ecr-public:DescribeEntitledRepositories.

Parameters:

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

    The nextToken value that's returned from a previous paginated DescribeEntitledRepositories request. Pagination continues from the end of the previous results. A nextToken is valid only for the account that received it. If the request fails with InvalidParameterException because the token no longer matches, start again without a nextToken.

    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 results that DescribeEntitledRepositories returns in paginated output. You can specify a value between 1 and 1000. If you don't use this parameter, DescribeEntitledRepositories returns up to 100 results. A page can contain fewer than maxResults results, or none, and still return a nextToken. Keep sending requests until nextToken is null.

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.

  • 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 list the premium repositories you're entitled to This example lists the premium repositories that you're entitled to through active AWS Marketplace purchases.

>>> client.describe_entitled_repositories()
Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
def describe_entitled_repositories(
    self,
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = 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_entitled_repositories_response.DescribeEntitledRepositoriesResponse":
    """<p>Returns the premium repositories that you're entitled to through your active Amazon Web Services Marketplace purchases. Amazon ECR looks up your purchases by calling the Amazon Web Services Marketplace <code>SearchAgreements</code> operation on your behalf, so you need permission for the <code>aws-marketplace:SearchAgreements</code> action in addition to <code>ecr-public:DescribeEntitledRepositories</code>.</p>

    Args:
        next_token: <p>The <code>nextToken</code> value that's returned from a previous paginated <code>DescribeEntitledRepositories</code> request. Pagination continues from the end of the previous results. A <code>nextToken</code> is valid only for the account that received it. If the request fails with <code>InvalidParameterException</code> because the token no longer matches, start again without a <code>nextToken</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>
        max_results: <p>The maximum number of results that <code>DescribeEntitledRepositories</code> returns in paginated output. You can specify a value between 1 and 1000. If you don't use this parameter, <code>DescribeEntitledRepositories</code> returns up to 100 results. A page can contain fewer than <code>maxResults</code> results, or none, and still return a <code>nextToken</code>. Keep sending requests until <code>nextToken</code> is <code>null</code>.</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.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.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 list the premium repositories you're entitled to
        This example lists the premium repositories that you're entitled to through active AWS Marketplace purchases.

        >>> client.describe_entitled_repositories()
    """

    def _handler(
        req: "OperationRequest[capo_ecr_public.types.describe_entitled_repositories_request.DescribeEntitledRepositoriesRequest]",
    ) -> OperationResponse[
        "capo_ecr_public.types.describe_entitled_repositories_response.DescribeEntitledRepositoriesResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.describe_entitled_repositories

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEntitledRepositories")
    )
    input_: capo_ecr_public.types.describe_entitled_repositories_request.DescribeEntitledRepositoriesRequest = {}
    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