From 27f79f98e29ad4e33adc30b8905ef30c6d9ed2e1 Mon Sep 17 00:00:00 2001 From: API Engineering Date: Mon, 8 Jun 2026 18:35:09 +0000 Subject: [PATCH] [bot] Updated client based on openapi-2d2ec6c/clientgen --- DO_OPENAPI_COMMIT_SHA.txt | 2 +- src/pydo/aio/operations/_operations.py | 1812 ++++++++++++++++++++++- src/pydo/operations/_operations.py | 1819 +++++++++++++++++++++++- 3 files changed, 3544 insertions(+), 89 deletions(-) diff --git a/DO_OPENAPI_COMMIT_SHA.txt b/DO_OPENAPI_COMMIT_SHA.txt index 55e0e421..476d9fa6 100644 --- a/DO_OPENAPI_COMMIT_SHA.txt +++ b/DO_OPENAPI_COMMIT_SHA.txt @@ -1 +1 @@ -6fd6c99 +2d2ec6c diff --git a/src/pydo/aio/operations/_operations.py b/src/pydo/aio/operations/_operations.py index bc566554..524e2daa 100644 --- a/src/pydo/aio/operations/_operations.py +++ b/src/pydo/aio/operations/_operations.py @@ -258,6 +258,7 @@ build_genai_attach_knowledge_base_request, build_genai_attach_knowledge_bases_request, build_genai_cancel_indexing_job_request, + build_genai_cancel_model_evaluation_run_request, build_genai_create_agent_api_key_request, build_genai_create_agent_request, build_genai_create_anthropic_api_key_request, @@ -283,6 +284,8 @@ build_genai_delete_knowledge_base_data_source_request, build_genai_delete_knowledge_base_request, build_genai_delete_model_api_key_request, + build_genai_delete_model_evaluation_preset_request, + build_genai_delete_model_evaluation_run_request, build_genai_delete_model_router_request, build_genai_delete_openai_api_key_request, build_genai_delete_scheduled_indexing_request, @@ -305,6 +308,7 @@ build_genai_get_indexing_job_request, build_genai_get_knowledge_base_request, build_genai_get_model_catalog_card_request, + build_genai_get_model_evaluation_preset_request, build_genai_get_model_evaluation_run_request, build_genai_get_model_evaluation_run_results_download_url_request, build_genai_get_model_router_request, @@ -322,6 +326,7 @@ build_genai_list_anthropic_api_keys_request, build_genai_list_custom_models_request, build_genai_list_datacenter_regions_request, + build_genai_list_evaluation_datasets_request, build_genai_list_evaluation_metrics_request, build_genai_list_evaluation_runs_by_test_case_request, build_genai_list_evaluation_test_cases_by_workspace_request, @@ -334,6 +339,7 @@ build_genai_list_model_api_keys_request, build_genai_list_model_catalog_request, build_genai_list_model_evaluation_metrics_request, + build_genai_list_model_evaluation_presets_request, build_genai_list_model_evaluation_runs_request, build_genai_list_model_router_presets_request, build_genai_list_model_router_task_presets_request, @@ -4228,6 +4234,13 @@ async def list( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -5781,6 +5794,14 @@ async def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -7485,6 +7506,14 @@ async def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -9127,6 +9156,14 @@ async def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -10760,6 +10797,14 @@ async def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -12362,6 +12407,12 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -13656,6 +13707,12 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -15121,6 +15178,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -16742,6 +16806,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -18302,6 +18373,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -19854,6 +19932,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -21342,6 +21427,12 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -22807,6 +22898,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -24428,6 +24526,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -25988,6 +26093,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -27540,6 +27652,13 @@ async def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -29011,6 +29130,12 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -30305,6 +30430,12 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -31770,6 +31901,13 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -33391,6 +33529,13 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -34951,6 +35096,13 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -36503,6 +36655,13 @@ async def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -38173,6 +38332,12 @@ async def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JS } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -39638,6 +39803,13 @@ async def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JS } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -41259,6 +41431,13 @@ async def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JS } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -42819,6 +42998,13 @@ async def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JS } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -44371,6 +44557,13 @@ async def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JS } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -45943,6 +46136,12 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -47239,6 +47438,12 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -48704,6 +48909,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -50325,6 +50537,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -51885,6 +52104,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -53437,6 +53663,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -54943,6 +55176,12 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -56408,6 +56647,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -58029,6 +58275,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -59589,6 +59842,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -61141,6 +61401,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -62627,6 +62894,12 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -63923,6 +64196,12 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -65388,6 +65667,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -67009,6 +67295,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -68569,6 +68862,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -70121,6 +70421,13 @@ async def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -71827,6 +72134,12 @@ async def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -73334,6 +73647,12 @@ async def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -74841,6 +75160,12 @@ async def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -76882,6 +77207,13 @@ async def list_deployments( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -78547,6 +78879,12 @@ async def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -80055,6 +80393,12 @@ async def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -81561,6 +81905,12 @@ async def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -83151,6 +83501,12 @@ async def get_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -84728,6 +85084,12 @@ async def cancel_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -87608,6 +87970,14 @@ async def list_events( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -89363,6 +89733,13 @@ async def get_event(self, app_id: str, event_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -91054,6 +91431,13 @@ async def cancel_event(self, app_id: str, event_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -93086,6 +93470,12 @@ async def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -94382,6 +94772,12 @@ async def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -95700,6 +96096,12 @@ async def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -97001,6 +97403,12 @@ async def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -98297,6 +98705,12 @@ async def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -100416,6 +100830,12 @@ async def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -101932,6 +102352,12 @@ async def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -103451,6 +103877,12 @@ async def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -105565,6 +105997,12 @@ async def revert_rollback(self, app_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -149281,6 +149719,10 @@ async def list_clusters( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the + CoreDNS Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -149364,9 +149806,12 @@ async def list_clusters( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC + subnet worker nodes are attached to. When unset, the default subnet for + the VPC is used.:code:`
`:code:`
`Requires ``vpc:read`` scope. } ], "links": { @@ -149588,6 +150033,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -149662,9 +150111,13 @@ async def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the VPC to + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet to attach + worker nodes to. When omitted on create, the default subnet for the VPC is used. + This value cannot be changed after the cluster is created. ``vpc_uuid`` must + also be set. :code:`
`:code:`
`Requires ``vpc:read`` scope. } # response body for status code(s): 201 @@ -149798,6 +150251,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -149874,9 +150331,14 @@ async def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -150041,6 +150503,10 @@ async def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -150117,9 +150583,14 @@ async def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -150271,6 +150742,10 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -150345,9 +150820,13 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the VPC to + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet to attach + worker nodes to. When omitted on create, the default subnet for the VPC is used. + This value cannot be changed after the cluster is created. ``vpc_uuid`` must + also be set. :code:`
`:code:`
`Requires ``vpc:read`` scope. } # response body for status code(s): 201 @@ -150481,6 +150960,10 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -150557,9 +151040,14 @@ async def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> J "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -150785,6 +151273,10 @@ async def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -150863,9 +151355,12 @@ async def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + worker nodes are attached to. When unset, the default subnet for the VPC is + used.:code:`
`:code:`
`Requires ``vpc:read`` scope. } } # response body for status code(s): 404 @@ -151031,6 +151526,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "ha": bool, # Optional. A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. When omitted @@ -151212,6 +151711,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -151288,9 +151791,14 @@ async def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -151467,6 +151975,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -151543,9 +152055,14 @@ async def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -151626,6 +152143,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "ha": bool, # Optional. A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. When omitted @@ -151807,6 +152328,10 @@ async def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -151883,9 +152408,14 @@ async def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -240807,7 +241337,15 @@ async def update_custom_model_metadata( # JSON input template you can fill out and use as your body input. body = { "description": "str", # Optional. + "input_modalities": [ + "str" # Optional. Input modalities supported (e.g., text, image). + ], + "license": "str", # Optional. License under which the model is distributed. "name": "str", # Optional. + "output_modalities": [ + "str" # Optional. Output modalities supported (e.g., text, image). + ], + "parameters": "str", # Optional. Number of parameters in the model. "tags": { "tags": [ "str" # Optional. List of tag strings. @@ -241075,7 +241613,15 @@ async def update_custom_model_metadata( # JSON input template you can fill out and use as your body input. body = { "description": "str", # Optional. + "input_modalities": [ + "str" # Optional. Input modalities supported (e.g., text, image). + ], + "license": "str", # Optional. License under which the model is distributed. "name": "str", # Optional. + "output_modalities": [ + "str" # Optional. Output modalities supported (e.g., text, image). + ], + "parameters": "str", # Optional. Number of parameters in the model. "tags": { "tags": [ "str" # Optional. List of tag strings. @@ -241281,6 +241827,138 @@ async def update_custom_model_metadata( return cast(JSON, deserialized) # type: ignore + @distributed_trace_async + async def list_evaluation_datasets( + self, *, dataset_type: str = "EVALUATION_DATASET_TYPE_UNKNOWN", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """List Evaluation Datasets. + + To list evaluation datasets, send a GET request to ``/v2/gen-ai/evaluation_datasets``. + + :keyword dataset_type: Filter by evaluation dataset type. Known values are: + "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK", + "EVALUATION_DATASET_TYPE_NON_ADK", and "EVALUATION_DATASET_TYPE_MODEL". Default value is + "EVALUATION_DATASET_TYPE_UNKNOWN". + :paramtype dataset_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "evaluation_datasets": [ + { + "created_at": "2020-02-20 00:00:00", # Optional. Time + created at. + "dataset_name": "str", # Optional. Name of the dataset. + "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN", # + Optional. Default value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known + values are: "EVALUATION_DATASET_TYPE_UNKNOWN", + "EVALUATION_DATASET_TYPE_ADK", "EVALUATION_DATASET_TYPE_NON_ADK", and + "EVALUATION_DATASET_TYPE_MODEL". + "dataset_uuid": "str", # Optional. UUID of the dataset. + "file_size": "str", # Optional. The size of the dataset + uploaded file in bytes. + "has_ground_truth": bool, # Optional. Does the dataset have + a ground truth column?. + "row_count": 0 # Optional. Number of rows in the dataset. + } + ] + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_list_evaluation_datasets_request( + dataset_type=dataset_type, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + @overload async def create_evaluation_dataset( self, @@ -250378,33 +251056,13 @@ async def list_model_evaluation_metrics(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def list_model_evaluation_runs( - self, - *, - eval_preset_uuid: Optional[str] = None, - status: str = "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", - page: Optional[int] = None, - per_page: Optional[int] = None, - **kwargs: Any - ) -> JSON: + async def list_model_evaluation_presets(self, **kwargs: Any) -> JSON: # pylint: disable=line-too-long - """List Model Evaluation Runs. + """List Model Evaluation Presets. - To list model evaluation runs, send a GET request to ``/v2/genai/model_evaluation_runs``. + To list all saved model evaluation presets, send a GET request to + ``/v2/genai/model_evaluation_presets``. - :keyword eval_preset_uuid: UUID of the evaluation preset to filter by. Default value is None. - :paramtype eval_preset_uuid: str - :keyword status: Filter by evaluation run status. Known values are: - "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", "MODEL_EVALUATION_RUN_QUEUED", - "MODEL_EVALUATION_RUN_RUNNING_DATASET", "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", - "MODEL_EVALUATION_RUN_CANCELLING", "MODEL_EVALUATION_RUN_CANCELLED", - "MODEL_EVALUATION_RUN_SUCCESSFUL", "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and - "MODEL_EVALUATION_RUN_FAILED". Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". - :paramtype status: str - :keyword page: Page number. Default value is None. - :paramtype page: int - :keyword per_page: Items per page. Default value is None. - :paramtype per_page: int :return: JSON object :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: @@ -250414,54 +251072,576 @@ async def list_model_evaluation_runs( # response body for status code(s): 200 response == { - "links": { - "pages": { - "first": "str", # Optional. First page. - "last": "str", # Optional. Last page. - "next": "str", # Optional. Next page. - "previous": "str" # Optional. Previous page. - } - }, - "meta": { - "page": 0, # Optional. The current page. - "pages": 0, # Optional. Total number of pages. - "total": 0 # Optional. Total amount of items over all pages. - }, - "runs": [ + "presets": [ { - "candidate_model_name": "str", # Optional. Name of the - candidate model being evaluated. - "candidate_model_source": - "CANDIDATE_MODEL_SOURCE_SERVERLESS", # Optional. Default value is - "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether inference runs against the - serverless platform, a dedicated deployment, or a model router. Known - values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", - "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". - "candidate_model_uuid": "str", # Optional. UUID of the - candidate model being evaluated. "created_at": "2020-02-20 00:00:00", # Optional. Timestamp - when the run was created. - "dataset_name": "str", # Optional. Name of the dataset used - for evaluation. - "dataset_uuid": "str", # Optional. UUID of the dataset used - for evaluation. - "eval_run_uuid": "str", # Optional. UUID of the evaluation - run. - "judge_model_name": "str", # Optional. Summary view of - evaluation runs for the run history list. + when the preset was created. + "dataset_name": "str", # Optional. List of explicitly saved + evaluation presets (reusable configs). + "dataset_uuid": "str", # Optional. Dataset used for + evaluation. + "eval_preset_uuid": "str", # Optional. UUID of the + evaluation preset. + "judge_model_name": "str", # Optional. List of explicitly + saved evaluation presets (reusable configs). "judge_model_uuid": "str", # Optional. Judge model used to score responses. - "name": "str", # Optional. Name of the evaluation run. - "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # - Optional. Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". - Model Evaluation Run Statuses. Known values are: - "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", "MODEL_EVALUATION_RUN_QUEUED", - "MODEL_EVALUATION_RUN_RUNNING_DATASET", - "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", - "MODEL_EVALUATION_RUN_CANCELLING", "MODEL_EVALUATION_RUN_CANCELLED", - "MODEL_EVALUATION_RUN_SUCCESSFUL", - "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and - "MODEL_EVALUATION_RUN_FAILED". + "metrics": [ + { + "category": "METRIC_CATEGORY_UNSPECIFIED", # + Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known + values are: "METRIC_CATEGORY_UNSPECIFIED", + "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES", + "METRIC_CATEGORY_SAFETY_AND_SECURITY", + "METRIC_CATEGORY_CONTEXT_QUALITY", and + "METRIC_CATEGORY_MODEL_FIT". + "description": "str", # Optional. Metrics + selected for this preset. + "evaluation_scope": + "EVALUATION_SCOPE_UNSPECIFIED", # Optional. Default value is + "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether a + metric belongs to agent evaluation or model evaluation. For + backwards compatibility, UNSPECIFIED defaults to agent metrics + only in list operations. Known values are: + "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and + "EVALUATION_SCOPE_MODEL". + "inverted": bool, # Optional. If true, the + metric is inverted, meaning that a lower value is better. + "is_metric_goal": bool, # Optional. Metrics + selected for this preset. + "metric_name": "str", # Optional. Metrics + selected for this preset. + "metric_rank": 0, # Optional. Metrics + selected for this preset. + "metric_type": "METRIC_TYPE_UNSPECIFIED", # + Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known + values are: "METRIC_TYPE_UNSPECIFIED", + "METRIC_TYPE_GENERAL_QUALITY", "METRIC_TYPE_RAG_AND_TOOL", + "METRIC_TYPE_MODEL_QUALITY", and "METRIC_TYPE_MODEL_SAFETY". + "metric_uuid": "str", # Optional. Metrics + selected for this preset. + "metric_value_type": + "METRIC_VALUE_TYPE_UNSPECIFIED", # Optional. Default value is + "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are: + "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER", + "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE". + "range_max": 0.0, # Optional. The maximum + value for the metric. + "range_min": 0.0 # Optional. The minimum + value for the metric. + } + ], + "name": "str", # Optional. Name of the evaluation preset. + "star_metric": { + "metric_uuid": "str", # Optional. List of explicitly + saved evaluation presets (reusable configs). + "name": "str", # Optional. List of explicitly saved + evaluation presets (reusable configs). + "success_threshold": 0.0, # Optional. The success + threshold for the star metric. This is a value that the metric must + reach to be considered successful. + "success_threshold_pct": 0 # Optional. The success + threshold for the star metric. This is a percentage value between 0 + and 100. + } + } + ] + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_list_model_evaluation_presets_request( + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace_async + async def get_model_evaluation_preset( + self, eval_preset_uuid: str, **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Retrieve Model Evaluation Preset. + + To retrieve a saved model evaluation preset, send a GET request to + ``/v2/genai/model_evaluation_presets/{eval_preset_uuid}``. + + :param eval_preset_uuid: UUID of the evaluation preset. Required. + :type eval_preset_uuid: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "preset": { + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + preset was created. + "dataset_name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "dataset_uuid": "str", # Optional. Dataset used for evaluation. + "eval_preset_uuid": "str", # Optional. UUID of the evaluation + preset. + "judge_model_name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "metrics": [ + { + "category": "METRIC_CATEGORY_UNSPECIFIED", # + Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known + values are: "METRIC_CATEGORY_UNSPECIFIED", + "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES", + "METRIC_CATEGORY_SAFETY_AND_SECURITY", + "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT". + "description": "str", # Optional. Metrics selected + for this preset. + "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", + # Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope + that determines whether a metric belongs to agent evaluation or model + evaluation. For backwards compatibility, UNSPECIFIED defaults to + agent metrics only in list operations. Known values are: + "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and + "EVALUATION_SCOPE_MODEL". + "inverted": bool, # Optional. If true, the metric is + inverted, meaning that a lower value is better. + "is_metric_goal": bool, # Optional. Metrics selected + for this preset. + "metric_name": "str", # Optional. Metrics selected + for this preset. + "metric_rank": 0, # Optional. Metrics selected for + this preset. + "metric_type": "METRIC_TYPE_UNSPECIFIED", # + Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known values + are: "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY", + "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and + "METRIC_TYPE_MODEL_SAFETY". + "metric_uuid": "str", # Optional. Metrics selected + for this preset. + "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", + # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known + values are: "METRIC_VALUE_TYPE_UNSPECIFIED", + "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and + "METRIC_VALUE_TYPE_PERCENTAGE". + "range_max": 0.0, # Optional. The maximum value for + the metric. + "range_min": 0.0 # Optional. The minimum value for + the metric. + } + ], + "name": "str", # Optional. Name of the evaluation preset. + "star_metric": { + "metric_uuid": "str", # Optional. Model Evaluation Preset - + a saved, reusable configuration for model evaluation runs. + "name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "success_threshold": 0.0, # Optional. The success threshold + for the star metric. This is a value that the metric must reach to be + considered successful. + "success_threshold_pct": 0 # Optional. The success threshold + for the star metric. This is a percentage value between 0 and 100. + } + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_get_model_evaluation_preset_request( + eval_preset_uuid=eval_preset_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace_async + async def delete_model_evaluation_preset( + self, eval_preset_uuid: str, **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Delete Model Evaluation Preset. + + To delete a saved model evaluation preset, send a DELETE request to + ``/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}``. + + :param eval_preset_uuid: UUID of the evaluation preset to delete. Required. + :type eval_preset_uuid: str + :return: JSON or JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_delete_model_evaluation_preset_request( + eval_preset_uuid=eval_preset_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace_async + async def list_model_evaluation_runs( + self, + *, + eval_preset_uuid: Optional[str] = None, + status: str = "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + page: Optional[int] = None, + per_page: Optional[int] = None, + statuses: Optional[List[str]] = None, + candidate_types: Optional[List[str]] = None, + search: Optional[str] = None, + sort_by: str = "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED", + sort_direction: str = "SORT_DIRECTION_UNSPECIFIED", + **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """List Model Evaluation Runs. + + To list model evaluation runs, send a GET request to ``/v2/genai/model_evaluation_runs``. + + :keyword eval_preset_uuid: UUID of the evaluation preset to filter by. Default value is None. + :paramtype eval_preset_uuid: str + :keyword status: Filter by evaluation run status. Known values are: + "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", "MODEL_EVALUATION_RUN_QUEUED", + "MODEL_EVALUATION_RUN_RUNNING_DATASET", "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", + "MODEL_EVALUATION_RUN_CANCELLING", "MODEL_EVALUATION_RUN_CANCELLED", + "MODEL_EVALUATION_RUN_SUCCESSFUL", "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". + :paramtype status: str + :keyword page: Page number. Default value is None. + :paramtype page: int + :keyword per_page: Items per page. Default value is None. + :paramtype per_page: int + :keyword statuses: Filter by one or more statuses. Empty means no status filter. Default value + is None. + :paramtype statuses: list[str] + :keyword candidate_types: Filter by one or more candidate model source types + (serverless, dedicated, router). Empty means no candidate-type filter. Default value is None. + :paramtype candidate_types: list[str] + :keyword search: Free-text search across the eval run name, candidate model name and + dataset name (case-insensitive substring match). Empty means no search. Default value is None. + :paramtype search: str + :keyword sort_by: Field to sort by. Defaults to creation date when unspecified. Known values + are: "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED", + "MODEL_EVALUATION_RUN_SORT_FIELD_CREATED_AT", and "MODEL_EVALUATION_RUN_SORT_FIELD_STATUS". + Default value is "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED". + :paramtype sort_by: str + :keyword sort_direction: Sort direction. Defaults to descending when unspecified. Known values + are: "SORT_DIRECTION_UNSPECIFIED", "SORT_DIRECTION_ASC", and "SORT_DIRECTION_DESC". Default + value is "SORT_DIRECTION_UNSPECIFIED". + :paramtype sort_direction: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "available_candidate_types": [ + "str" # Optional. Full set of candidate model source types the FE + can offer in the candidate-type filter UI. + ], + "available_statuses": [ + "str" # Optional. Full set of statuses the FE can offer in the + status filter UI. Returned on every list call so clients never need to + hardcode the enum values. + ], + "links": { + "pages": { + "first": "str", # Optional. First page. + "last": "str", # Optional. Last page. + "next": "str", # Optional. Next page. + "previous": "str" # Optional. Previous page. + } + }, + "meta": { + "page": 0, # Optional. The current page. + "pages": 0, # Optional. Total number of pages. + "total": 0 # Optional. Total amount of items over all pages. + }, + "runs": [ + { + "candidate_model_name": "str", # Optional. Name of the + candidate model being evaluated. + "candidate_model_source": + "CANDIDATE_MODEL_SOURCE_SERVERLESS", # Optional. Default value is + "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether inference runs against the + serverless platform, a dedicated deployment, or a model router. Known + values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the + candidate model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp + when the run was created. + "dataset_name": "str", # Optional. Name of the dataset used + for evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used + for evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation + run. + "judge_model_name": "str", # Optional. Summary view of + evaluation runs for the run history list. + "judge_model_uuid": "str", # Optional. Judge model used to + score responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # + Optional. Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". + Model Evaluation Run Statuses. Known values are: + "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", "MODEL_EVALUATION_RUN_QUEUED", + "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", + "MODEL_EVALUATION_RUN_CANCELLING", "MODEL_EVALUATION_RUN_CANCELLED", + "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". } ] } @@ -250500,6 +251680,11 @@ async def list_model_evaluation_runs( status=status, page=page, per_page=per_page, + statuses=statuses, + candidate_types=candidate_types, + search=search, + sort_by=sort_by, + sort_direction=sort_direction, headers=_headers, params=_params, ) @@ -251307,6 +252492,477 @@ async def get_model_evaluation_run( return cast(JSON, deserialized) # type: ignore + @distributed_trace_async + async def delete_model_evaluation_run( + self, eval_run_uuid: str, **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Delete Model Evaluation Run. + + To delete a model evaluation run, send a DELETE request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}``. The run must be in a terminal status (\\ + ``successful``\\ , ``partially_successful``\\ , ``failed``\\ , or ``cancelled``\\ ). For runs + still in progress, either wait for the run to finish or cancel it, then retry the delete once + the run reaches a terminal status. + + :param eval_run_uuid: UUID of the model evaluation run to delete. The run must be in a terminal + status (\\ ``successful``\\ , ``partially_successful``\\ , ``failed``\\ , or ``cancelled``\\ + ). + For runs still in progress, either wait for the run to finish or cancel + it, then retry the delete. Required. + :type eval_run_uuid: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "error": "str", # Optional. Error message if deletion failed. + "status": "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Status of + delete operation. Known values are: + "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "DELETE_MODEL_EVALUATION_RUN_STATUS_SUCCESS", and + "DELETE_MODEL_EVALUATION_RUN_STATUS_FAIL". + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_delete_model_evaluation_run_request( + eval_run_uuid=eval_run_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @overload + async def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Default value is None. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "eval_run_uuid": "str" # Optional. UUID of the model evaluation run to + cancel. Returned by ``CreateModelEvaluationRun`` and listed via + ``ListModelEvaluationRuns``. The run must be in a non-terminal status (queued, + running_dataset, or evaluating_results); already-terminal runs return an error. + } + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @overload + async def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @distributed_trace_async + async def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[Union[JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Is either a JSON type or a IO[bytes] type. Default value is None. + :type body: JSON or IO[bytes] + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "eval_run_uuid": "str" # Optional. UUID of the model evaluation run to + cancel. Returned by ``CreateModelEvaluationRun`` and listed via + ``ListModelEvaluationRuns``. The run must be in a non-terminal status (queued, + running_dataset, or evaluating_results); already-terminal runs return an error. + } + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + cls: ClsType[JSON] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = body + else: + _json = None + + _request = build_genai_cancel_model_evaluation_run_request( + eval_run_uuid=eval_run_uuid, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + await response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + @distributed_trace_async async def get_model_evaluation_run_results_download_url( # pylint: disable=name-too-long self, eval_run_uuid: str, **kwargs: Any diff --git a/src/pydo/operations/_operations.py b/src/pydo/operations/_operations.py index a1e4ce56..f35deb95 100644 --- a/src/pydo/operations/_operations.py +++ b/src/pydo/operations/_operations.py @@ -13509,6 +13509,29 @@ def build_genai_update_custom_model_metadata_request( # pylint: disable=name-to return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) +def build_genai_list_evaluation_datasets_request( # pylint: disable=name-too-long + *, dataset_type: str = "EVALUATION_DATASET_TYPE_UNKNOWN", **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/evaluation_datasets" + + # Construct parameters + if dataset_type is not None: + _params["dataset_type"] = _SERIALIZER.query("dataset_type", dataset_type, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest( + method="GET", url=_url, params=_params, headers=_headers, **kwargs + ) + + def build_genai_create_evaluation_dataset_request( **kwargs: Any, ) -> HttpRequest: # pylint: disable=name-too-long @@ -14298,12 +14321,79 @@ def build_genai_list_model_evaluation_metrics_request( return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) +def build_genai_list_model_evaluation_presets_request( + **kwargs: Any, +) -> HttpRequest: # pylint: disable=name-too-long + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/model_evaluation_presets" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_genai_get_model_evaluation_preset_request( # pylint: disable=name-too-long + eval_preset_uuid: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}" + path_format_arguments = { + "eval_preset_uuid": _SERIALIZER.url( + "eval_preset_uuid", eval_preset_uuid, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_genai_delete_model_evaluation_preset_request( # pylint: disable=name-too-long + eval_preset_uuid: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}" + path_format_arguments = { + "eval_preset_uuid": _SERIALIZER.url( + "eval_preset_uuid", eval_preset_uuid, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) + + def build_genai_list_model_evaluation_runs_request( # pylint: disable=name-too-long *, eval_preset_uuid: Optional[str] = None, status: str = "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", page: Optional[int] = None, per_page: Optional[int] = None, + statuses: Optional[List[str]] = None, + candidate_types: Optional[List[str]] = None, + search: Optional[str] = None, + sort_by: str = "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED", + sort_direction: str = "SORT_DIRECTION_UNSPECIFIED", **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -14325,6 +14415,20 @@ def build_genai_list_model_evaluation_runs_request( # pylint: disable=name-too- _params["page"] = _SERIALIZER.query("page", page, "int") if per_page is not None: _params["per_page"] = _SERIALIZER.query("per_page", per_page, "int") + if statuses is not None: + _params["statuses"] = _SERIALIZER.query("statuses", statuses, "[str]") + if candidate_types is not None: + _params["candidate_types"] = _SERIALIZER.query( + "candidate_types", candidate_types, "[str]" + ) + if search is not None: + _params["search"] = _SERIALIZER.query("search", search, "str") + if sort_by is not None: + _params["sort_by"] = _SERIALIZER.query("sort_by", sort_by, "str") + if sort_direction is not None: + _params["sort_direction"] = _SERIALIZER.query( + "sort_direction", sort_direction, "str" + ) # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -14391,6 +14495,55 @@ def build_genai_get_model_evaluation_run_request( # pylint: disable=name-too-lo ) +def build_genai_delete_model_evaluation_run_request( # pylint: disable=name-too-long + eval_run_uuid: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}" + path_format_arguments = { + "eval_run_uuid": _SERIALIZER.url("eval_run_uuid", eval_run_uuid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) + + +def build_genai_cancel_model_evaluation_run_request( # pylint: disable=name-too-long + eval_run_uuid: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel" + path_format_arguments = { + "eval_run_uuid": _SERIALIZER.url("eval_run_uuid", eval_run_uuid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header( + "content_type", content_type, "str" + ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + def build_genai_get_model_evaluation_run_results_download_url_request( # pylint: disable=name-too-long eval_run_uuid: str, **kwargs: Any ) -> HttpRequest: @@ -19156,6 +19309,13 @@ def list( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -20709,6 +20869,14 @@ def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -22413,6 +22581,14 @@ def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -24055,6 +24231,14 @@ def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -25688,6 +25872,14 @@ def list( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -27290,6 +27482,12 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -28584,6 +28782,12 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -30049,6 +30253,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -31670,6 +31881,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -33230,6 +33448,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -34782,6 +35007,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -36270,6 +36502,12 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -37735,6 +37973,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -39356,6 +39601,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -40916,6 +41168,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -42468,6 +42727,13 @@ def create( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -43939,6 +44205,12 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -45233,6 +45505,12 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -46698,6 +46976,13 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -48319,6 +48604,13 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -49879,6 +50171,13 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -51431,6 +51730,13 @@ def create(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -53101,6 +53407,12 @@ def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -54566,6 +54878,13 @@ def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -56187,6 +56506,13 @@ def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -57747,6 +58073,13 @@ def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -59299,6 +59632,13 @@ def get(self, id: str, *, name: Optional[str] = None, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -60871,6 +61211,12 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -62167,6 +62513,12 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -63632,6 +63984,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -65253,6 +65612,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -66813,6 +67179,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -68365,6 +68738,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -69871,6 +70251,12 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -71336,6 +71722,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -72957,6 +73350,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -74517,6 +74917,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -76069,6 +76476,13 @@ def update( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -77553,6 +77967,12 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -78849,6 +79269,12 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -80314,6 +80740,13 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -81935,6 +82368,13 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -83495,6 +83935,13 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -85047,6 +85494,13 @@ def update(self, id: str, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -86753,6 +87207,12 @@ def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -88260,6 +88720,12 @@ def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -89767,6 +90233,12 @@ def restart( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -91808,6 +92280,13 @@ def list_deployments( } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -93473,6 +93952,12 @@ def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -94981,6 +95466,12 @@ def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -96487,6 +96978,12 @@ def create_deployment( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -98075,6 +98572,12 @@ def get_deployment(self, app_id: str, deployment_id: str, **kwargs: Any) -> JSON } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -99650,6 +100153,12 @@ def cancel_deployment(self, app_id: str, deployment_id: str, **kwargs: Any) -> J } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -102530,6 +103039,14 @@ def list_events( } ], "ingress": { + "custom_error_page_url": "str", # + Optional. Optional HTTPS URL of a custom error page to + display when the app is unreachable. The page is shown in a + full-viewport iframe. The target must allow framing: avoid + ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks + the platform. If omitted, the default platform error page is + used. "rules": [ { "component": { @@ -104285,6 +104802,13 @@ def get_event(self, app_id: str, event_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -105976,6 +106500,13 @@ def cancel_event(self, app_id: str, event_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. + Optional HTTPS URL of a custom error page to display when the app + is unreachable. The page is shown in a full-viewport iframe. The + target must allow framing: avoid ``X-Frame-Options: DENY`` and a + restrictive ``Content-Security-Policy`` ``frame-ancestors`` that + blocks the platform. If omitted, the default platform error page + is used. "rules": [ { "component": { @@ -108008,6 +108539,12 @@ def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -109304,6 +109841,12 @@ def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -110622,6 +111165,12 @@ def validate_app_spec( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -111921,6 +112470,12 @@ def validate_app_spec(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -113217,6 +113772,12 @@ def validate_app_spec(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional HTTPS + URL of a custom error page to display when the app is unreachable. The + page is shown in a full-viewport iframe. The target must allow framing: + avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the platform. + If omitted, the default platform error page is used. "rules": [ { "component": { @@ -115336,6 +115897,12 @@ def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -116852,6 +117419,12 @@ def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -118371,6 +118944,12 @@ def create_rollback( } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -120485,6 +121064,12 @@ def revert_rollback(self, app_id: str, **kwargs: Any) -> JSON: } ], "ingress": { + "custom_error_page_url": "str", # Optional. Optional + HTTPS URL of a custom error page to display when the app is + unreachable. The page is shown in a full-viewport iframe. The target + must allow framing: avoid ``X-Frame-Options: DENY`` and a restrictive + ``Content-Security-Policy`` ``frame-ancestors`` that blocks the + platform. If omitted, the default platform error page is used. "rules": [ { "component": { @@ -164175,6 +164760,10 @@ def list_clusters( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the + CoreDNS Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -164258,9 +164847,12 @@ def list_clusters( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC + subnet worker nodes are attached to. When unset, the default subnet for + the VPC is used.:code:`
`:code:`
`Requires ``vpc:read`` scope. } ], "links": { @@ -164482,6 +165074,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -164556,9 +165152,13 @@ def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the VPC to + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet to attach + worker nodes to. When omitted on create, the default subnet for the VPC is used. + This value cannot be changed after the cluster is created. ``vpc_uuid`` must + also be set. :code:`
`:code:`
`Requires ``vpc:read`` scope. } # response body for status code(s): 201 @@ -164692,6 +165292,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -164768,9 +165372,14 @@ def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -164935,6 +165544,10 @@ def create_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -165011,9 +165624,14 @@ def create_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -165165,6 +165783,10 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -165239,9 +165861,13 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the VPC to + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet to attach + worker nodes to. When omitted on create, the default subnet for the VPC is used. + This value cannot be changed after the cluster is created. ``vpc_uuid`` must + also be set. :code:`
`:code:`
`Requires ``vpc:read`` scope. } # response body for status code(s): 201 @@ -165375,6 +166001,10 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -165451,9 +166081,14 @@ def create_cluster(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON: "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } """ @@ -165679,6 +166314,10 @@ def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -165757,9 +166396,12 @@ def get_cluster(self, cluster_id: str, **kwargs: Any) -> JSON: "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + worker nodes are attached to. When unset, the default subnet for the VPC is + used.:code:`
`:code:`
`Requires ``vpc:read`` scope. } } # response body for status code(s): 404 @@ -165925,6 +166567,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "ha": bool, # Optional. A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. When omitted @@ -166106,6 +166752,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -166182,9 +166832,14 @@ def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -166361,6 +167016,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -166437,9 +167096,14 @@ def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -166520,6 +167184,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS Cluster + Proportional Autoscaler add-on is enabled. + }, "ha": bool, # Optional. A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. When omitted @@ -166701,6 +167369,10 @@ def update_cluster( "enabled": bool # Optional. Indicates whether the control plane firewall is enabled. }, + "coredns_autoscaler": { + "enabled": bool # Optional. Indicates whether the CoreDNS + Cluster Proportional Autoscaler add-on is enabled. + }, "created_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. @@ -166777,9 +167449,14 @@ def update_cluster( "updated_at": "2020-02-20 00:00:00", # Optional. A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. - "vpc_uuid": "str" # Optional. A string specifying the UUID of the + "vpc_uuid": "str", # Optional. A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.:code:`
`:code:`
`Requires ``vpc:read`` scope. + "worker_subnet_uuid": "str" # Optional. The UUID of the VPC subnet + to attach worker nodes to. When omitted on create, the default subnet for the + VPC is used. This value cannot be changed after the cluster is created. + ``vpc_uuid`` must also be set. :code:`
`:code:`
`Requires ``vpc:read`` + scope. } } # response body for status code(s): 404 @@ -255675,7 +256352,15 @@ def update_custom_model_metadata( # JSON input template you can fill out and use as your body input. body = { "description": "str", # Optional. + "input_modalities": [ + "str" # Optional. Input modalities supported (e.g., text, image). + ], + "license": "str", # Optional. License under which the model is distributed. "name": "str", # Optional. + "output_modalities": [ + "str" # Optional. Output modalities supported (e.g., text, image). + ], + "parameters": "str", # Optional. Number of parameters in the model. "tags": { "tags": [ "str" # Optional. List of tag strings. @@ -255943,7 +256628,15 @@ def update_custom_model_metadata( # JSON input template you can fill out and use as your body input. body = { "description": "str", # Optional. + "input_modalities": [ + "str" # Optional. Input modalities supported (e.g., text, image). + ], + "license": "str", # Optional. License under which the model is distributed. "name": "str", # Optional. + "output_modalities": [ + "str" # Optional. Output modalities supported (e.g., text, image). + ], + "parameters": "str", # Optional. Number of parameters in the model. "tags": { "tags": [ "str" # Optional. List of tag strings. @@ -256149,6 +256842,138 @@ def update_custom_model_metadata( return cast(JSON, deserialized) # type: ignore + @distributed_trace + def list_evaluation_datasets( + self, *, dataset_type: str = "EVALUATION_DATASET_TYPE_UNKNOWN", **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """List Evaluation Datasets. + + To list evaluation datasets, send a GET request to ``/v2/gen-ai/evaluation_datasets``. + + :keyword dataset_type: Filter by evaluation dataset type. Known values are: + "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK", + "EVALUATION_DATASET_TYPE_NON_ADK", and "EVALUATION_DATASET_TYPE_MODEL". Default value is + "EVALUATION_DATASET_TYPE_UNKNOWN". + :paramtype dataset_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "evaluation_datasets": [ + { + "created_at": "2020-02-20 00:00:00", # Optional. Time + created at. + "dataset_name": "str", # Optional. Name of the dataset. + "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN", # + Optional. Default value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known + values are: "EVALUATION_DATASET_TYPE_UNKNOWN", + "EVALUATION_DATASET_TYPE_ADK", "EVALUATION_DATASET_TYPE_NON_ADK", and + "EVALUATION_DATASET_TYPE_MODEL". + "dataset_uuid": "str", # Optional. UUID of the dataset. + "file_size": "str", # Optional. The size of the dataset + uploaded file in bytes. + "has_ground_truth": bool, # Optional. Does the dataset have + a ground truth column?. + "row_count": 0 # Optional. Number of rows in the dataset. + } + ] + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_list_evaluation_datasets_request( + dataset_type=dataset_type, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + @overload def create_evaluation_dataset( self, @@ -265245,6 +266070,474 @@ def list_model_evaluation_metrics(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore + @distributed_trace + def list_model_evaluation_presets(self, **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """List Model Evaluation Presets. + + To list all saved model evaluation presets, send a GET request to + ``/v2/genai/model_evaluation_presets``. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "presets": [ + { + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp + when the preset was created. + "dataset_name": "str", # Optional. List of explicitly saved + evaluation presets (reusable configs). + "dataset_uuid": "str", # Optional. Dataset used for + evaluation. + "eval_preset_uuid": "str", # Optional. UUID of the + evaluation preset. + "judge_model_name": "str", # Optional. List of explicitly + saved evaluation presets (reusable configs). + "judge_model_uuid": "str", # Optional. Judge model used to + score responses. + "metrics": [ + { + "category": "METRIC_CATEGORY_UNSPECIFIED", # + Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known + values are: "METRIC_CATEGORY_UNSPECIFIED", + "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES", + "METRIC_CATEGORY_SAFETY_AND_SECURITY", + "METRIC_CATEGORY_CONTEXT_QUALITY", and + "METRIC_CATEGORY_MODEL_FIT". + "description": "str", # Optional. Metrics + selected for this preset. + "evaluation_scope": + "EVALUATION_SCOPE_UNSPECIFIED", # Optional. Default value is + "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether a + metric belongs to agent evaluation or model evaluation. For + backwards compatibility, UNSPECIFIED defaults to agent metrics + only in list operations. Known values are: + "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and + "EVALUATION_SCOPE_MODEL". + "inverted": bool, # Optional. If true, the + metric is inverted, meaning that a lower value is better. + "is_metric_goal": bool, # Optional. Metrics + selected for this preset. + "metric_name": "str", # Optional. Metrics + selected for this preset. + "metric_rank": 0, # Optional. Metrics + selected for this preset. + "metric_type": "METRIC_TYPE_UNSPECIFIED", # + Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known + values are: "METRIC_TYPE_UNSPECIFIED", + "METRIC_TYPE_GENERAL_QUALITY", "METRIC_TYPE_RAG_AND_TOOL", + "METRIC_TYPE_MODEL_QUALITY", and "METRIC_TYPE_MODEL_SAFETY". + "metric_uuid": "str", # Optional. Metrics + selected for this preset. + "metric_value_type": + "METRIC_VALUE_TYPE_UNSPECIFIED", # Optional. Default value is + "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are: + "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER", + "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE". + "range_max": 0.0, # Optional. The maximum + value for the metric. + "range_min": 0.0 # Optional. The minimum + value for the metric. + } + ], + "name": "str", # Optional. Name of the evaluation preset. + "star_metric": { + "metric_uuid": "str", # Optional. List of explicitly + saved evaluation presets (reusable configs). + "name": "str", # Optional. List of explicitly saved + evaluation presets (reusable configs). + "success_threshold": 0.0, # Optional. The success + threshold for the star metric. This is a value that the metric must + reach to be considered successful. + "success_threshold_pct": 0 # Optional. The success + threshold for the star metric. This is a percentage value between 0 + and 100. + } + } + ] + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_list_model_evaluation_presets_request( + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace + def get_model_evaluation_preset(self, eval_preset_uuid: str, **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """Retrieve Model Evaluation Preset. + + To retrieve a saved model evaluation preset, send a GET request to + ``/v2/genai/model_evaluation_presets/{eval_preset_uuid}``. + + :param eval_preset_uuid: UUID of the evaluation preset. Required. + :type eval_preset_uuid: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "preset": { + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + preset was created. + "dataset_name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "dataset_uuid": "str", # Optional. Dataset used for evaluation. + "eval_preset_uuid": "str", # Optional. UUID of the evaluation + preset. + "judge_model_name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "metrics": [ + { + "category": "METRIC_CATEGORY_UNSPECIFIED", # + Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known + values are: "METRIC_CATEGORY_UNSPECIFIED", + "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES", + "METRIC_CATEGORY_SAFETY_AND_SECURITY", + "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT". + "description": "str", # Optional. Metrics selected + for this preset. + "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", + # Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope + that determines whether a metric belongs to agent evaluation or model + evaluation. For backwards compatibility, UNSPECIFIED defaults to + agent metrics only in list operations. Known values are: + "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and + "EVALUATION_SCOPE_MODEL". + "inverted": bool, # Optional. If true, the metric is + inverted, meaning that a lower value is better. + "is_metric_goal": bool, # Optional. Metrics selected + for this preset. + "metric_name": "str", # Optional. Metrics selected + for this preset. + "metric_rank": 0, # Optional. Metrics selected for + this preset. + "metric_type": "METRIC_TYPE_UNSPECIFIED", # + Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known values + are: "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY", + "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and + "METRIC_TYPE_MODEL_SAFETY". + "metric_uuid": "str", # Optional. Metrics selected + for this preset. + "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", + # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known + values are: "METRIC_VALUE_TYPE_UNSPECIFIED", + "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and + "METRIC_VALUE_TYPE_PERCENTAGE". + "range_max": 0.0, # Optional. The maximum value for + the metric. + "range_min": 0.0 # Optional. The minimum value for + the metric. + } + ], + "name": "str", # Optional. Name of the evaluation preset. + "star_metric": { + "metric_uuid": "str", # Optional. Model Evaluation Preset - + a saved, reusable configuration for model evaluation runs. + "name": "str", # Optional. Model Evaluation Preset - a + saved, reusable configuration for model evaluation runs. + "success_threshold": 0.0, # Optional. The success threshold + for the star metric. This is a value that the metric must reach to be + considered successful. + "success_threshold_pct": 0 # Optional. The success threshold + for the star metric. This is a percentage value between 0 and 100. + } + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_get_model_evaluation_preset_request( + eval_preset_uuid=eval_preset_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @distributed_trace + def delete_model_evaluation_preset( + self, eval_preset_uuid: str, **kwargs: Any + ) -> JSON: + # pylint: disable=line-too-long + """Delete Model Evaluation Preset. + + To delete a saved model evaluation preset, send a DELETE request to + ``/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}``. + + :param eval_preset_uuid: UUID of the evaluation preset to delete. Required. + :type eval_preset_uuid: str + :return: JSON or JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_delete_model_evaluation_preset_request( + eval_preset_uuid=eval_preset_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + @distributed_trace def list_model_evaluation_runs( self, @@ -265253,6 +266546,11 @@ def list_model_evaluation_runs( status: str = "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", page: Optional[int] = None, per_page: Optional[int] = None, + statuses: Optional[List[str]] = None, + candidate_types: Optional[List[str]] = None, + search: Optional[str] = None, + sort_by: str = "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED", + sort_direction: str = "SORT_DIRECTION_UNSPECIFIED", **kwargs: Any, ) -> JSON: # pylint: disable=line-too-long @@ -265273,6 +266571,24 @@ def list_model_evaluation_runs( :paramtype page: int :keyword per_page: Items per page. Default value is None. :paramtype per_page: int + :keyword statuses: Filter by one or more statuses. Empty means no status filter. Default value + is None. + :paramtype statuses: list[str] + :keyword candidate_types: Filter by one or more candidate model source types + (serverless, dedicated, router). Empty means no candidate-type filter. Default value is None. + :paramtype candidate_types: list[str] + :keyword search: Free-text search across the eval run name, candidate model name and + dataset name (case-insensitive substring match). Empty means no search. Default value is None. + :paramtype search: str + :keyword sort_by: Field to sort by. Defaults to creation date when unspecified. Known values + are: "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED", + "MODEL_EVALUATION_RUN_SORT_FIELD_CREATED_AT", and "MODEL_EVALUATION_RUN_SORT_FIELD_STATUS". + Default value is "MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED". + :paramtype sort_by: str + :keyword sort_direction: Sort direction. Defaults to descending when unspecified. Known values + are: "SORT_DIRECTION_UNSPECIFIED", "SORT_DIRECTION_ASC", and "SORT_DIRECTION_DESC". Default + value is "SORT_DIRECTION_UNSPECIFIED". + :paramtype sort_direction: str :return: JSON object :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: @@ -265282,6 +266598,15 @@ def list_model_evaluation_runs( # response body for status code(s): 200 response == { + "available_candidate_types": [ + "str" # Optional. Full set of candidate model source types the FE + can offer in the candidate-type filter UI. + ], + "available_statuses": [ + "str" # Optional. Full set of statuses the FE can offer in the + status filter UI. Returned on every list call so clients never need to + hardcode the enum values. + ], "links": { "pages": { "first": "str", # Optional. First page. @@ -265368,6 +266693,11 @@ def list_model_evaluation_runs( status=status, page=page, per_page=per_page, + statuses=statuses, + candidate_types=candidate_types, + search=search, + sort_by=sort_by, + sort_direction=sort_direction, headers=_headers, params=_params, ) @@ -266175,6 +267505,475 @@ def get_model_evaluation_run( return cast(JSON, deserialized) # type: ignore + @distributed_trace + def delete_model_evaluation_run(self, eval_run_uuid: str, **kwargs: Any) -> JSON: + # pylint: disable=line-too-long + """Delete Model Evaluation Run. + + To delete a model evaluation run, send a DELETE request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}``. The run must be in a terminal status (\\ + ``successful``\\ , ``partially_successful``\\ , ``failed``\\ , or ``cancelled``\\ ). For runs + still in progress, either wait for the run to finish or cancel it, then retry the delete once + the run reaches a terminal status. + + :param eval_run_uuid: UUID of the model evaluation run to delete. The run must be in a terminal + status (\\ ``successful``\\ , ``partially_successful``\\ , ``failed``\\ , or ``cancelled``\\ + ). + For runs still in progress, either wait for the run to finish or cancel + it, then retry the delete. Required. + :type eval_run_uuid: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "error": "str", # Optional. Error message if deletion failed. + "status": "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Status of + delete operation. Known values are: + "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "DELETE_MODEL_EVALUATION_RUN_STATUS_SUCCESS", and + "DELETE_MODEL_EVALUATION_RUN_STATUS_FAIL". + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[JSON] = kwargs.pop("cls", None) + + _request = build_genai_delete_model_evaluation_run_request( + eval_run_uuid=eval_run_uuid, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + + @overload + def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Default value is None. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "eval_run_uuid": "str" # Optional. UUID of the model evaluation run to + cancel. Returned by ``CreateModelEvaluationRun`` and listed via + ``ListModelEvaluationRuns``. The run must be in a non-terminal status (queued, + running_dataset, or evaluating_results); already-terminal runs return an error. + } + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @overload + def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + + @distributed_trace + def cancel_model_evaluation_run( + self, + eval_run_uuid: str, + body: Optional[Union[JSON, IO[bytes]]] = None, + **kwargs: Any, + ) -> JSON: + # pylint: disable=line-too-long + """Cancel Model Evaluation Run. + + To cancel an in-progress model evaluation run, send a PUT request to + ``/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel``. + + :param eval_run_uuid: UUID of the model evaluation run to cancel. Returned by + ``CreateModelEvaluationRun`` + and listed via ``ListModelEvaluationRuns``. The run must be in a non-terminal status + (queued, running_dataset, or evaluating_results); already-terminal runs return an + error. Required. + :type eval_run_uuid: str + :param body: Is either a JSON type or a IO[bytes] type. Default value is None. + :type body: JSON or IO[bytes] + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "eval_run_uuid": "str" # Optional. UUID of the model evaluation run to + cancel. Returned by ``CreateModelEvaluationRun`` and listed via + ``ListModelEvaluationRuns``. The run must be in a non-terminal status (queued, + running_dataset, or evaluating_results); already-terminal runs return an error. + } + + # response body for status code(s): 200 + response == { + "run": { + "candidate_model_name": "str", # Optional. Name of the candidate + model being evaluated. + "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", # + Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether + inference runs against the serverless platform, a dedicated deployment, or a + model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS", + "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER". + "candidate_model_uuid": "str", # Optional. UUID of the candidate + model being evaluated. + "created_at": "2020-02-20 00:00:00", # Optional. Timestamp when the + run was created. + "dataset_name": "str", # Optional. Name of the dataset used for + evaluation. + "dataset_uuid": "str", # Optional. UUID of the dataset used for + evaluation. + "eval_run_uuid": "str", # Optional. UUID of the evaluation run. + "judge_model_name": "str", # Optional. Model Evaluation Run Summary + - lightweight view used in run history list. + "judge_model_uuid": "str", # Optional. Judge model used to score + responses. + "name": "str", # Optional. Name of the evaluation run. + "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" # Optional. + Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation + Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", + "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET", + "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING", + "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL", + "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and + "MODEL_EVALUATION_RUN_FAILED". + } + } + # response body for status code(s): 404 + response == { + "id": "str", # A short identifier corresponding to the HTTP status code + returned. For example, the ID for a response returning a 404 status code would + be "not_found.". Required. + "message": "str", # A message providing additional information about the + error, including details to help resolve it when possible. Required. + "request_id": "str" # Optional. Optionally, some endpoints may include a + request ID that should be provided when reporting bugs or opening support + tickets to help identify the issue. + } + """ + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + 401: cast( + Type[HttpResponseError], + lambda response: ClientAuthenticationError(response=response), + ), + 429: HttpResponseError, + 500: HttpResponseError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) + cls: ClsType[JSON] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = body + else: + _json = None + + _request = build_genai_cancel_model_evaluation_run_request( + eval_run_uuid=eval_run_uuid, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = ( + self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + if _stream: + response.read() # Load the body in memory and close the socket + map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 404: + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore + + return cast(JSON, deserialized) # type: ignore + @distributed_trace def get_model_evaluation_run_results_download_url( # pylint: disable=name-too-long self, eval_run_uuid: str, **kwargs: Any