Skip to content

get_content_association async

get_content_association(
    knowledge_base_id: UuidOrArn,
    content_id: UuidOrArn,
    content_association_id: UuidOrArn,
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
) -> GetContentAssociationResponse

Returns the content association.

For more information about content associations--what they are and when they are used--see Integrate Amazon Q in Connect with step-by-step guides in the Connect Customer Administrator Guide.

Parameters:

  • knowledge_base_id (UuidOrArn) –

    The identifier of the knowledge base.

  • content_id (UuidOrArn) –

    The identifier of the content.

  • content_association_id (UuidOrArn) –

    The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

Raises:

Source code in docs_src/capo_qconnect/_services/async_q_connect.py
async def get_content_association(
    self,
    knowledge_base_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    content_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    content_association_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
) -> "capo_qconnect.types.get_content_association_response.GetContentAssociationResponse":
    """<p>Returns the content association.</p> <p>For more information about content associations--what they are and when they are used--see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/integrate-q-with-guides.html">Integrate Amazon Q in Connect with step-by-step guides</a> in the <i>Connect Customer Administrator Guide</i>.</p>

    Args:
        knowledge_base_id: <p>The identifier of the knowledge base.</p>
        content_id: <p>The identifier of the content.</p>
        content_association_id: <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_qconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_qconnect.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_qconnect.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_qconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qconnect.types.get_content_association_request.GetContentAssociationRequest]",
    ) -> AsyncOperationResponse[
        "capo_qconnect.types.get_content_association_response.GetContentAssociationResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.get_content_association

        (
            output,
            http_response,
        ) = await capo_qconnect._operations.wisdom_service.get_content_association.async_get_content_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetContentAssociation")
    )
    input_: capo_qconnect.types.get_content_association_request.GetContentAssociationRequest = {
        "knowledge_base_id": knowledge_base_id,
        "content_id": content_id,
        "content_association_id": content_association_id,
    }

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