Skip to content

get_report_metadata

get_report_metadata(
    report_id: ReportId,
    *,
    config_overrides: Optional[ArtifactClientConfig] = None,
    report_version: Optional[VersionAttribute] = None,
) -> GetReportMetadataResponse

Get the metadata 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.

Raises:

Examples:

Invoke GetReportMetadata operation on the latest version of a specific report The GetReportMetadata 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.

>>> client.get_report_metadata(report_id='report-bqhUJF3FrQZsMJpb')
Source code in docs_src/capo_artifact/_services/artifact.py
def get_report_metadata(
    self,
    report_id: "capo_artifact.types.report_id.ReportId",
    *,
    config_overrides: Optional[ArtifactClientConfig] = None,
    report_version: Optional[
        "capo_artifact.types.version_attribute.VersionAttribute"
    ] = None,
) -> "capo_artifact.types.get_report_metadata_response.GetReportMetadataResponse":
    """<p>Get the metadata 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>

    Raises:
        capo_artifact.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</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 GetReportMetadata operation on the latest version of a specific report
        The GetReportMetadata 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.

        >>> client.get_report_metadata(report_id='report-bqhUJF3FrQZsMJpb')
    """

    def _handler(
        req: "OperationRequest[capo_artifact.types.get_report_metadata_request.GetReportMetadataRequest]",
    ) -> OperationResponse[
        "capo_artifact.types.get_report_metadata_response.GetReportMetadataResponse"
    ]:
        import capo_artifact._operations.artifact.get_report_metadata

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetReportMetadata")
    )
    input_: capo_artifact.types.get_report_metadata_request.GetReportMetadataRequest = {
        "report_id": report_id
    }
    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