Skip to content

get_report

get_report(
    report_id: ReportId,
    term_token: ShortStringAttribute,
    *,
    config_overrides: Optional[ArtifactClientConfig] = None,
    report_version: Optional[VersionAttribute] = None,
) -> GetReportResponse

Get the content for a single report.

Parameters:

  • report_id (ReportId) –

    Unique resource ID for the report resource.

  • report_version (Optional[VersionAttribute], default: None ) –

    Version for the report resource.

  • term_token (ShortStringAttribute) –

    Unique download token provided by GetTermForReport API.

Raises:

Examples:

Invoke GetReport operation on the latest version of a specific report The GetReport operation is invoked on a reportId and on a optional version. Callers must provide a termToken, which is provided by the GetTermForReport operation. If callers do not provide a version, it will default to the report's latest version

>>> client.get_report(report_id='report-abcdef0123456789', term_token='term-token-abcdefghijklm01234567890')
Source code in docs_src/capo_artifact/_services/artifact.py
def get_report(
    self,
    report_id: "capo_artifact.types.report_id.ReportId",
    term_token: "capo_artifact.types.short_string_attribute.ShortStringAttribute",
    *,
    config_overrides: Optional[ArtifactClientConfig] = None,
    report_version: Optional[
        "capo_artifact.types.version_attribute.VersionAttribute"
    ] = None,
) -> "capo_artifact.types.get_report_response.GetReportResponse":
    """<p>Get the content for a single report.</p>

    Args:
        report_id: <p>Unique resource ID for the report resource.</p>
        report_version: <p>Version for the report resource.</p>
        term_token: <p>Unique download token provided by GetTermForReport API.</p>

    Raises:
        capo_artifact.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_artifact.errors.conflict_exception.ConflictException: <p>Request to create/modify content would result in a conflict.</p>
        capo_artifact.errors.internal_server_exception.InternalServerException: <p>An unknown server exception has occurred.</p>
        capo_artifact.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_artifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_artifact.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_artifact.errors.validation_exception.ValidationException: <p>Request fails to satisfy the constraints specified by an AWS service.</p>
        capo_artifact.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke GetReport operation on the latest version of a specific report
        The GetReport operation is invoked on a reportId and on a optional version.
                    Callers must provide a termToken, which is provided by the GetTermForReport
                    operation. If callers do not provide a version, it will default to the
                    report's latest version

        >>> client.get_report(report_id='report-abcdef0123456789', term_token='term-token-abcdefghijklm01234567890')
    """

    def _handler(
        req: "OperationRequest[capo_artifact.types.get_report_request.GetReportRequest]",
    ) -> OperationResponse[
        "capo_artifact.types.get_report_response.GetReportResponse"
    ]:
        import capo_artifact._operations.artifact.get_report

        output, http_response = (
            capo_artifact._operations.artifact.get_report.get_report(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetReport")
    )
    input_: capo_artifact.types.get_report_request.GetReportRequest = {
        "report_id": report_id,
        "term_token": term_token,
    }
    if report_version is not None:
        input_["report_version"] = report_version

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