Skip to content

put_repository_catalog_data

put_repository_catalog_data(
    repository_name: RepositoryName,
    catalog_data: RepositoryCatalogDataInput,
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
) -> PutRepositoryCatalogDataResponse

Creates or updates the catalog data for a repository in a public registry.

Parameters:

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

    The Amazon Web Services account ID that's associated with the public registry the repository is in. If you do not specify a registry, the default public registry is assumed.

  • repository_name (RepositoryName) –

    The name of the repository to create or update the catalog data for.

  • catalog_data (RepositoryCatalogDataInput) –

    An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.

Raises:

Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
def put_repository_catalog_data(
    self,
    repository_name: "capo_ecr_public.types.repository_name.RepositoryName",
    catalog_data: "capo_ecr_public.types.repository_catalog_data_input.RepositoryCatalogDataInput",
    *,
    config_overrides: Optional[ECRPUBLICClientConfig] = None,
    registry_id: Optional["capo_ecr_public.types.registry_id.RegistryId"] = None,
) -> "capo_ecr_public.types.put_repository_catalog_data_response.PutRepositoryCatalogDataResponse":
    """<p>Creates or updates the catalog data for a repository in a public registry.</p>

    Args:
        registry_id: <p>The Amazon Web Services account ID that's associated with the public registry the repository is in. If you do not specify a registry, the default public registry is assumed.</p>
        repository_name: <p>The name of the repository to create or update the catalog data for.</p>
        catalog_data: <p>An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.</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.put_repository_catalog_data_request.PutRepositoryCatalogDataRequest]",
    ) -> OperationResponse[
        "capo_ecr_public.types.put_repository_catalog_data_response.PutRepositoryCatalogDataResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.put_repository_catalog_data

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutRepositoryCatalogData")
    )
    input_: capo_ecr_public.types.put_repository_catalog_data_request.PutRepositoryCatalogDataRequest = {
        "repository_name": repository_name,
        "catalog_data": catalog_data,
    }
    if registry_id is not None:
        input_["registry_id"] = registry_id

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