Skip to content

get_premium_repository_catalog_data async

get_premium_repository_catalog_data(
    repository_name: RepositoryName,
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
) -> GetPremiumRepositoryCatalogDataResponse

Retrieves the catalog data that's associated with a premium repository.

Parameters:

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

    The Amazon Web Services account ID that's associated with the public registry that contains the premium repository. 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_name (RepositoryName) –

    The name of the premium repository to retrieve the catalog data for.

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.

  • RepositoryCatalogDataNotFoundException –

    The repository catalog data doesn't exist. Use PutRepositoryCatalogData or PutPremiumRepositoryCatalogData to set the catalog data for the repository.

  • 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 get the catalog data for a premium repository This example gets the catalog data for the premium repository my-premium-repository.

>>> await client.get_premium_repository_catalog_data(repository_name='my-premium-repository')
Source code in docs_src/capo_ecr_public/_services/async_ecrpublic.py
async def get_premium_repository_catalog_data(
    self,
    repository_name: "capo_ecr_public.types.repository_name.RepositoryName",
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional["capo_ecr_public.types.registry_id.RegistryId"] = None,
) -> "capo_ecr_public.types.get_premium_repository_catalog_data_response.GetPremiumRepositoryCatalogDataResponse":
    """<p>Retrieves the catalog data that's associated with a premium repository.</p>

    Args:
        registry_id: <p>The Amazon Web Services account ID that's associated with the public registry that contains the premium repository. 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_name: <p>The name of the premium repository to retrieve the catalog data for.</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.repository_catalog_data_not_found_exception.RepositoryCatalogDataNotFoundException: <p>The repository catalog data doesn't exist. Use <code>PutRepositoryCatalogData</code> or <code>PutPremiumRepositoryCatalogData</code> to set the catalog data for the repository.</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 get the catalog data for a premium repository
        This example gets the catalog data for the premium repository my-premium-repository.

        >>> await client.get_premium_repository_catalog_data(repository_name='my-premium-repository')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr_public.types.get_premium_repository_catalog_data_request.GetPremiumRepositoryCatalogDataRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr_public.types.get_premium_repository_catalog_data_response.GetPremiumRepositoryCatalogDataResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.get_premium_repository_catalog_data

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPremiumRepositoryCatalogData")
    )
    input_: capo_ecr_public.types.get_premium_repository_catalog_data_request.GetPremiumRepositoryCatalogDataRequest = {
        "repository_name": repository_name
    }
    if registry_id is not None:
        input_["registry_id"] = registry_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output