Skip to content

get_download_url_for_publisher_report async

get_download_url_for_publisher_report(
    report_id: PublisherReportId,
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
) -> GetDownloadUrlForPublisherReportResponse

Returns a URL that you can use to download a publisher report as a compressed CSV file. You can download only reports for your own account. Use ListPublisherReports to get the report IDs.

Parameters:

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.

  • PublisherReportNotFoundException –

    The specified publisher report can't be found. Check the report ID, and use ListPublisherReports to list the available reports.

  • 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 a download URL for a publisher report This example returns a URL that you can use to download a publisher report.

>>> await client.get_download_url_for_publisher_report(report_id='k3x9q0m2v7b1n8z4c6w5ta')
Source code in docs_src/capo_ecr_public/_services/async_ecrpublic.py
async def get_download_url_for_publisher_report(
    self,
    report_id: "capo_ecr_public.types.publisher_report_id.PublisherReportId",
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
) -> "capo_ecr_public.types.get_download_url_for_publisher_report_response.GetDownloadUrlForPublisherReportResponse":
    """<p>Returns a URL that you can use to download a publisher report as a compressed CSV file. You can download only reports for your own account. Use <code>ListPublisherReports</code> to get the report IDs.</p>

    Args:
        report_id: <p>The ID of the publisher report to download.</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.publisher_report_not_found_exception.PublisherReportNotFoundException: <p>The specified publisher report can't be found. Check the report ID, and use <code>ListPublisherReports</code> to list the available reports.</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 a download URL for a publisher report
        This example returns a URL that you can use to download a publisher report.

        >>> await client.get_download_url_for_publisher_report(report_id='k3x9q0m2v7b1n8z4c6w5ta')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr_public.types.get_download_url_for_publisher_report_request.GetDownloadUrlForPublisherReportRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr_public.types.get_download_url_for_publisher_report_response.GetDownloadUrlForPublisherReportResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.get_download_url_for_publisher_report

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDownloadUrlForPublisherReport")
    )
    input_: capo_ecr_public.types.get_download_url_for_publisher_report_request.GetDownloadUrlForPublisherReportRequest = {
        "report_id": report_id
    }

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