Skip to content

get_assessment_framework async

get_assessment_framework(
    framework_id: UUID,
    *,
    config_overrides: Optional[AsyncAuditManagerClientConfig] = None,
) -> GetAssessmentFrameworkResponse

Gets information about a specified framework.

Parameters:

  • framework_id (UUID) –

    The identifier for the framework.

Raises:

  • AccessDeniedException –

    Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.

  • InternalServerException –

    An internal service error occurred during the processing of your request. Try again later.

  • ResourceNotFoundException –

    The resource that's specified in the request can't be found.

  • ValidationException –

    The request has invalid or missing parameters.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_auditmanager/_services/async_audit_manager.py
async def get_assessment_framework(
    self,
    framework_id: "capo_auditmanager.types.uuid.UUID",
    *,
    config_overrides: Optional[AsyncAuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.get_assessment_framework_response.GetAssessmentFrameworkResponse":
    """<p>Gets information about a specified framework.</p>

    Args:
        framework_id: <p> The identifier for the framework. </p>

    Raises:
        capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
        capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
        capo_auditmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource that's specified in the request can't be found. </p>
        capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
        capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auditmanager.types.get_assessment_framework_request.GetAssessmentFrameworkRequest]",
    ) -> AsyncOperationResponse[
        "capo_auditmanager.types.get_assessment_framework_response.GetAssessmentFrameworkResponse"
    ]:
        import capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_assessment_framework

        (
            output,
            http_response,
        ) = await capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_assessment_framework.async_get_assessment_framework(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_auditmanager.types.get_assessment_framework_response.GetAssessmentFrameworkResponse",
    ) -> dict[str, Any]:
        import capo_auditmanager.types.get_assessment_framework_response

        return capo_auditmanager.types.get_assessment_framework_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetAssessmentFramework", redact_output=_redact_output),
    )
    input_: capo_auditmanager.types.get_assessment_framework_request.GetAssessmentFrameworkRequest = {
        "framework_id": framework_id
    }

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