Skip to content

get_term_for_report async

get_term_for_report(
    report_id: ReportId,
    *,
    config_overrides: Optional[AsyncArtifactClientConfig] = None,
    report_version: Optional[VersionAttribute] = None,
) -> GetTermForReportResponse

Get the Term content associated with 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.

Raises:

Examples:

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

>>> await client.get_term_for_report(report_id='report-abcdef0123456789')
Source code in docs_src/capo_artifact/_services/async_artifact.py
async def get_term_for_report(
    self,
    report_id: "capo_artifact.types.report_id.ReportId",
    *,
    config_overrides: Optional[AsyncArtifactClientConfig] = None,
    report_version: Optional[
        "capo_artifact.types.version_attribute.VersionAttribute"
    ] = None,
) -> "capo_artifact.types.get_term_for_report_response.GetTermForReportResponse":
    """<p>Get the Term content associated with 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>

    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 GetTermForReport operation on the latest version of a specific report
        The GetTermForReport operation is invoked on a reportId and on a optional version.
                    If callers do not provide a version, it will default to the report's latest version.

        >>> await client.get_term_for_report(report_id='report-abcdef0123456789')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_artifact.types.get_term_for_report_request.GetTermForReportRequest]",
    ) -> AsyncOperationResponse[
        "capo_artifact.types.get_term_for_report_response.GetTermForReportResponse"
    ]:
        import capo_artifact._operations.artifact.get_term_for_report

        (
            output,
            http_response,
        ) = await capo_artifact._operations.artifact.get_term_for_report.async_get_term_for_report(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTermForReport")
    )
    input_: capo_artifact.types.get_term_for_report_request.GetTermForReportRequest = {
        "report_id": report_id
    }
    if report_version is not None:
        input_["report_version"] = report_version

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