Skip to content

list_assistant_associations

list_assistant_associations(
    assistant_id: UuidOrArn,
    *,
    config_overrides: Optional[WisdomClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAssistantAssociationsResponse

Lists information about assistant associations.

Parameters:

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return per page.

  • assistant_id (UuidOrArn) –

    The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

Raises:

Source code in docs_src/capo_wisdom/_services/wisdom.py
def list_assistant_associations(
    self,
    assistant_id: "capo_wisdom.types.uuid_or_arn.UuidOrArn",
    *,
    config_overrides: Optional[WisdomClientConfig] = None,
    next_token: Optional["capo_wisdom.types.next_token.NextToken"] = None,
    max_results: Optional["capo_wisdom.types.max_results.MaxResults"] = None,
) -> "capo_wisdom.types.list_assistant_associations_response.ListAssistantAssociationsResponse":
    """<p>Lists information about assistant associations.</p>

    Args:
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
        max_results: <p>The maximum number of results to return per page.</p>
        assistant_id: <p>The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>

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

    def _handler(
        req: "OperationRequest[capo_wisdom.types.list_assistant_associations_request.ListAssistantAssociationsRequest]",
    ) -> OperationResponse[
        "capo_wisdom.types.list_assistant_associations_response.ListAssistantAssociationsResponse"
    ]:
        import capo_wisdom._operations.wisdom_service.list_assistant_associations

        output, http_response = (
            capo_wisdom._operations.wisdom_service.list_assistant_associations.list_assistant_associations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssistantAssociations")
    )
    input_: capo_wisdom.types.list_assistant_associations_request.ListAssistantAssociationsRequest = {
        "assistant_id": assistant_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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