list_models
async
¶
list_models(
assistant_id: UuidOrArn,
*,
config_overrides: Optional[AsyncQConnectClientConfig] = None,
ai_prompt_type: Optional[AIPromptType] = None,
model_lifecycle: Optional[ModelLifecycle] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
) -> ListModelsResponse
Lists the models available to an Amazon Q in Connect assistant in the assistant's Amazon Web Services Region. The available models are determined by the region of the specified assistant.
Parameters:
-
assistant_id(UuidOrArn) –The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN. The assistant's region determines which models are available.
-
ai_prompt_type(Optional[AIPromptType], default:None) –The type of the AI Prompt to filter models by. When specified, only models that support the given AI Prompt type are returned.
-
model_lifecycle(Optional[ModelLifecycle], default:None) –The lifecycle status of models to filter by. When specified, only models with the given lifecycle status are returned.
-
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.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
CreateAPI (such asCreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated. -
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnauthorizedException–You do not have permission to perform this action.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.