ai_api_client_sdk.resource_clients.scenario_client module¶
- class ai_api_client_sdk.resource_clients.scenario_client.ScenarioClient(rest_client: RestClient)¶
Bases:
BaseClientScenarioClient is a class implemented for interacting with the scenario related endpoints of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- get(scenario_id: str, resource_group: str = None) Scenario¶
Retrieves the scenario from the server.
- Parameters:
scenario_id (str) – ID of the scenario to be retrieved
resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
The retrieved scenario
- Return type:
class:ai_api_client_sdk.models.scenario.Scenario
- query(only_llm_scenarios: bool = False, resource_group: str = None) ScenarioQueryResponse¶
Queries the scenarios.
- Parameters:
only_llm_scenarios (bool, optional) – indicates whether to query for LLM scenarios only, defaults to False
resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.scenario_query_response.ScenarioQueryResponse
- query_llm_scenarios(resource_group: str = None) ScenarioQueryResponse¶
Queries for the LLM scenarios.
- Parameters:
resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIRequestException if an unexpected exception occurs while trying to send a request to the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.scenario_query_response.ScenarioQueryResponse
- query_versions(scenario_id: str, label_selector: List[str] = None, resource_group: str = None) VersionQueryResponse¶
Queries the versions.
- Parameters:
scenario_id (str) – ID of the scenario, the versions should belong to
label_selector (List[str], optional) – list of the label selector strings in the form of “key=value” or “key!=value”, to filter the scenarios with respect to their labels, defaults to None
resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.scenario_query_response.ScenarioQueryResponse